#NEWLINE# def read_tokens( file ) : #NEWLINE# #INDENT# 'Reads tokens from a file handle' #NEWLINE# lines = file . readlines ( ) #NEWLINE# return [ l . rstrip ( '\n' ) for l in lines if ( len ( l . rstrip ( '\n' ) ) > 0 ) ]