Changeset 2736 for trunk/GSASII.py


Ignore:
Timestamp:
Mar 3, 2017 11:03:36 AM (7 years ago)
Author:
toby
Message:

more unicode fixes, fix shelx END problem

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/GSASII.py

    r2735 r2736  
    329329            except Exception,errmsg:
    330330                print('\nImport_'+errprefix+': Error importing file '+ filename)
    331                 print('Error message: '+str(errmsg)+'\n')
     331                print(u'Error message: {}\n'.format(errmsg))
    332332            if fp: fp.close()
    333333
     
    652652            PhaseName = rd.Phase['General']['Name'][:]
    653653            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))
    655655            if not G2gd.GetPatternTreeItemId(self,self.root,'Phases'):
    656656                sub = self.PatternTree.AppendItem(parent=self.root,text='Phases')
     
    10981098                Iparm[S[:12]] = S[12:-1]
    10991099        except IOError:
    1100             print('Error reading file:'+str(instfile))
     1100            print(u'Error reading file: {}'.format(instfile))
    11011101        if fp:       
    11021102            fp.close()
     
    14241424                    return GetDefaultParms(self,rd)
    14251425            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))
    14281429        #Finally - ask user for Instrument parametrs file - seems it can't be in a zip file
    14291430        while True: # loop until we get a file that works or we get a cancel
     
    14641465                else:
    14651466                    self.ErrorDialog('Read Error',
    1466                                      'Error opening/reading file '+str(instfile))
     1467                                     u'Error opening/reading file {}'.format(instfile))
    14671468    def EnableRefineCommand(self):
    14681469        haveData = False
     
    15951596                    print('done')
    15961597                except Exception as err:
    1597                     print('error: '+str(err))
     1598                    print(u'error: {}'.format(err))
    15981599                    print('with commands -------------------')
    1599                     print(str(corr))
     1600                    print(corr)
    16001601                    print('---------------------------------')
    16011602                finally:
     
    18171818        self.PatternTree.Expand(Id)
    18181819        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))
    18211822
    18221823        # make a list of phase names
     
    38103811            if 'pId' not in Phases[phase]:
    38113812                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
    38133814        rigidbodyDict = self.PatternTree.GetItemPyData(   
    38143815            G2gd.GetPatternTreeItemId(self,self.root,'Rigid bodies'))
Note: See TracChangeset for help on using the changeset viewer.