Changeset 2341 for trunk/GSASII.py


Ignore:
Timestamp:
Jun 23, 2016 9:25:06 PM (5 years ago)
Author:
toby
Message:

improve powder imports: suppress printing of binary data; improve validation of old GSAS binary files

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/GSASII.py

    r2304 r2341  
    555555            else:
    556556                if singlereader:
     557                    print('The '+ rd.formatName+
     558                            ' reader was not able to read file '+filename+msg)
     559                    try:
     560                        print('\n\nError message(s):\n\t'+errorReport)
     561                    except:
     562                        pass
    557563                    self.ErrorDialog('Read Error','The '+ rd.formatName+
    558                                      ' reader was not able to read file '+filename+msg+
    559                                      '\n\nError message(s):\n'+errorReport
    560                                      )
     564                                     ' reader was not able to read file '+filename+msg)
    561565                else:
    562                     self.ErrorDialog('Read Error','No reader was able to read file '+filename+msg+
    563                                      '\n\nError messages:\n'+errorReport
    564                                      )
     566                    print('No reader was able to read file '+filename+msg)
     567                    try:
     568                        print('\n\nError message(s):\n\t'+errorReport)
     569                    except:
     570                        pass
     571                    self.ErrorDialog('Read Error','No reader was able to read file '+filename+msg)
    565572            if fp: fp.close()
    566573        return rd_list
     
    14591466                    dlg.Destroy()
    14601467            HistName = G2obj.MakeUniqueLabel(HistName,PWDRlist)
    1461             print 'Read powder data '+str(HistName)+ \
    1462                 ' from file '+str(rd.readfilename) + \
    1463                 ' with parameters from '+str(rd.instmsg)
     1468            print('Read powder data '+str(HistName)+
     1469                ' from file '+str(rd.readfilename) +
     1470                ' (format: '+ rd.formatName +
     1471                '). Inst parameters from '+str(rd.instmsg))
    14641472            # data are read, now store them in the tree
    14651473            Id = self.PatternTree.AppendItem(parent=self.root,text=HistName)
     
    15471555        phaseNameList = usedHistograms.keys() # phase names in use
    15481556        if not phaseNameList: return # no phases yet, nothing to do
    1549         header = 'Select phase(s) to add the new\npowder dataset(s) to:'
     1557        header = 'Select phase(s) to link\nto new data:'
    15501558        for Name in newHistList:
    15511559            header += '\n  '+str(Name)
Note: See TracChangeset for help on using the changeset viewer.