def FetchOne(self):
        while self.mLastLine is not None:
            if self.mLastLine[0] == ">":
                break
            self.mLastLine = self.mFile.readline()
        else:
            return (None, None)

        description = self.mLastLine[1:-1]
        sequence = ""
        while 1:
            line = self.mFile.readline()
            if not line:
                break
            if line[0] == ">":
                self.mLastLine = line
                break

            sequence += line[:-1]

        return (description, re.sub("\s", "", sequence))
returns a tuple (description, sequence).
dataset/ETHPy150Open CGATOxford/cgat/obsolete/Fasta.py/Fasta.FetchOne