#NEWLINE# def FetchOne( self ) : #NEWLINE# #INDENT# 'returns a tuple (description, sequence).\n\n        Returns (None, None) if no more data is there.\n        ' #NEWLINE# while ( self . mLastLine is not None ) : #NEWLINE# #INDENT# if ( self . mLastLine [ 0 ] == '>' ) : #NEWLINE# #INDENT# break #NEWLINE# #UNINDENT# self . mLastLine = self . mFile . readline ( ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# return ( None , None ) #NEWLINE# #UNINDENT# description = sequence . mLastLine [ 1 : ( - 1 ) ] #NEWLINE# sequence = '' #NEWLINE# while 1 : #NEWLINE# #INDENT# line = self . mFile . readline ( ) #NEWLINE# if ( not line ) : #NEWLINE# #INDENT# break #NEWLINE# #UNINDENT# if ( line [ 0 ] == '>' ) : #NEWLINE# #INDENT# self . mLastLine = line #NEWLINE# break #NEWLINE# #UNINDENT# sequence += line [ : ( - 1 ) ] #NEWLINE# #UNINDENT# return ( description , re . sub ( '\\s' , '' , sequence ) )