Changeset 2736 for trunk/GSASII.py
- Timestamp:
- Mar 3, 2017 11:03:36 AM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/GSASII.py
r2735 r2736 329 329 except Exception,errmsg: 330 330 print('\nImport_'+errprefix+': Error importing file '+ filename) 331 print( 'Error message: '+str(errmsg)+'\n')331 print(u'Error message: {}\n'.format(errmsg)) 332 332 if fp: fp.close() 333 333 … … 652 652 PhaseName = rd.Phase['General']['Name'][:] 653 653 newPhaseList.append(PhaseName) 654 print 'Read phase '+str(PhaseName)+' from file '+str(self.lastimport)654 print(u'Read phase {} from file {}'.format(PhaseName,self.lastimport)) 655 655 if not G2gd.GetPatternTreeItemId(self,self.root,'Phases'): 656 656 sub = self.PatternTree.AppendItem(parent=self.root,text='Phases') … … 1098 1098 Iparm[S[:12]] = S[12:-1] 1099 1099 except IOError: 1100 print( 'Error reading file:'+str(instfile))1100 print(u'Error reading file: {}'.format(instfile)) 1101 1101 if fp: 1102 1102 fp.close() … … 1424 1424 return GetDefaultParms(self,rd) 1425 1425 else: 1426 self.ErrorDialog('Open Error','Error opening instrument parameter file ' 1427 +str(instfile)+' requested by file '+ filename) 1426 self.ErrorDialog('Open Error', 1427 u'Error opening instrument parameter file ' 1428 +'{} requested by file '.format(instfile,filename)) 1428 1429 #Finally - ask user for Instrument parametrs file - seems it can't be in a zip file 1429 1430 while True: # loop until we get a file that works or we get a cancel … … 1464 1465 else: 1465 1466 self.ErrorDialog('Read Error', 1466 'Error opening/reading file '+str(instfile))1467 u'Error opening/reading file {}'.format(instfile)) 1467 1468 def EnableRefineCommand(self): 1468 1469 haveData = False … … 1595 1596 print('done') 1596 1597 except Exception as err: 1597 print( 'error: '+str(err))1598 print(u'error: {}'.format(err)) 1598 1599 print('with commands -------------------') 1599 print( str(corr))1600 print(corr) 1600 1601 print('---------------------------------') 1601 1602 finally: … … 1817 1818 self.PatternTree.Expand(Id) 1818 1819 self.PatternTree.SelectItem(Id) 1819 print( 'Added simulation powder data '+HistName+1820 ' with parameters from '+str(rd.instmsg))1820 print(u'Added simulation powder data {}'++ 1821 ' with parameters from {}'.format(HistName,rd.instmsg)) 1821 1822 1822 1823 # make a list of phase names … … 3810 3811 if 'pId' not in Phases[phase]: 3811 3812 self.ErrorDialog('View parameter error','You must run least squares at least once') 3812 raise Exception,'No pId for phase '+ str(phase)3813 raise Exception,'No pId for phase '+phase 3813 3814 rigidbodyDict = self.PatternTree.GetItemPyData( 3814 3815 G2gd.GetPatternTreeItemId(self,self.root,'Rigid bodies'))
Note: See TracChangeset
for help on using the changeset viewer.