Changeset 2542
- Timestamp:
- Nov 21, 2016 1:52:48 PM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/GSASII.py
r2539 r2542 308 308 readerlist.append(reader) 309 309 except AttributeError: 310 print 'Import_'+errprefix+': Attribute Error '+ str(filename)310 print 'Import_'+errprefix+': Attribute Error '+ filename 311 311 #except ImportError: 312 # print 'Import_'+errprefix+': Error importing file '+ str(filename)312 # print 'Import_'+errprefix+': Error importing file '+ filename 313 313 except Exception,errmsg: 314 print('\nImport_'+errprefix+': Error importing file '+ str(filename))314 print('\nImport_'+errprefix+': Error importing file '+ filename) 315 315 print('Error message: '+str(errmsg)+'\n') 316 316 if fp: fp.close() … … 328 328 def PreviewFile(self,filename,fp): 329 329 'confirm we have the right file' 330 rdmsg = 'File '+ repr(filename)+' begins:\n\n'330 rdmsg = 'File '+ filename +' begins:\n\n' 331 331 for i in range(3): 332 332 rdmsg += fp.readline() 333 333 rdmsg += '\n\nDo you want to read this file?' 334 334 if not all([ord(c) < 128 and ord(c) != 0 for c in rdmsg]): # show only if ASCII 335 rdmsg = 'File '+str( 336 filename)+' is a binary file. Do you want to read this file?' 335 rdmsg = 'File '+ filename +' is a binary file. Do you want to read this file?' 337 336 # it would be better to use something that 338 337 # would resize better, but this will do for now
Note: See TracChangeset
for help on using the changeset viewer.