#NEWLINE# def find_result_or_done( self ) : #NEWLINE# #INDENT# self . done_flags = 0 #NEWLINE# while True : #NEWLINE# #INDENT# marker = self . get_token_id ( ) #NEWLINE# if ( marker == TDS7_RESULT_TOKEN ) : #NEWLINE# #INDENT# self . process_token ( marker ) #NEWLINE# return True #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if ( marker in ( TDS_DONE_TOKEN , TDS_DONEPROC_TOKEN , TDS_DONEINPROC_TOKEN ) ) : #NEWLINE# #INDENT# self . process_end ( marker ) #NEWLINE# if ( self . done_flags & TDS_DONE_MORE_RESULTS ) : #NEWLINE# #INDENT# if ( self . done_flags & TDS_DONE_COUNT ) : #NEWLINE# #INDENT# return True #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# continue #NEWLINE# #UNINDENT# #UNINDENT# else : #NEWLINE# #INDENT# return False #NEWLINE# #UNINDENT# #UNINDENT# else : #NEWLINE# #INDENT# self . process_token ( marker )