Logo Search packages:      
Sourcecode: python-biopython version File versions  Download package

def Bio::GenBank::Iterator::next (   self )
Return the next GenBank record from the handle.

Will return None if we ran out of records.

Definition at line 92 of file __init__.py.

                  :
        """Return the next GenBank record from the handle.

        Will return None if we ran out of records.
        """
        if self._parser is None :
            lines = []
            while True :
                line = self.handle.readline()
                if not line : return None #Premature end of file?
                lines.append(line)
                if line.rstrip() == "//" : break
            return "".join(lines)
        try :
            return self._parser.parse(self.handle)
        except StopIteration :
            return None


Generated by  Doxygen 1.6.0   Back to index