#NEWLINE# def _open_ascii( self , fname = None ) : #NEWLINE# #INDENT# 'open ascii file, return lines after some checking' #NEWLINE# if ( fname is None ) : #NEWLINE# #INDENT# fname = self . filename #NEWLINE# #UNINDENT# if ( fname is None ) : #NEWLINE# #INDENT# return None #NEWLINE# #UNINDENT# self . ShowProgress ( 1.0 ) #NEWLINE# try : #NEWLINE# #INDENT# f = open ( fname , 'r' ) #NEWLINE# lines = f . readlines ( ) #NEWLINE# lines . reverse ( ) #NEWLINE# f . close ( ) #NEWLINE# #UNINDENT# except : #NEWLINE# #INDENT# self . ShowMessage ( ( 'ERROR: general error reading file %s ' % lines ) ) #NEWLINE# return None #NEWLINE# #UNINDENT# line1 = lines . pop ( ) #NEWLINE# if ( 'Epics Scan' not in line1 ) : #NEWLINE# #INDENT# self . ShowMessage ( ( 'Error: %s is not an Epics Scan file' % fname ) ) #NEWLINE# return None #NEWLINE# #UNINDENT# return lines