#NEWLINE# def _read_text_file( self , file_name , raw = False ) : #NEWLINE# #INDENT# 'Read a text file with the appropriate compression and encoding.\n\n        Comments and empty lines are skipped unless raw is True.\n\n        ' #NEWLINE# inp = self . _open_text_file_read ( file_name ) #NEWLINE# try : #NEWLINE# #INDENT# for line in inp : #NEWLINE# #INDENT# line = line . rstrip ( ) #NEWLINE# if ( ( not raw ) and ( ( len ( line ) == 0 ) or line . startswith ( self . comment_start ) ) ) : #NEWLINE# #INDENT# continue #NEWLINE# #UNINDENT# if self . lowercase : #NEWLINE# #INDENT# ( yield line . lower ( ) ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# ( yield line ) #NEWLINE# #UNINDENT# #UNINDENT# #UNINDENT# except KeyboardInterrupt : #NEWLINE# #INDENT# if ( file_name == '-' ) : #NEWLINE# #INDENT# _logger . info ( 'Finished reading from stdin' ) #NEWLINE# return #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# raise