Changeset 1961 for trunk/GSASIIIO.py


Ignore:
Timestamp:
Aug 25, 2015 4:41:05 PM (6 years ago)
Author:
toby
Message:

save package info in GPX; display only in Debug mode

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/GSASIIIO.py

    r1960 r1961  
    10031003                if datum[0] == 'Controls' and 'LastSavedUsing' in datum[1]:
    10041004                    LastSavedUsing = datum[1]['LastSavedUsing']
     1005                if datum[0] == 'Controls' and 'PythonVersions' in datum[1] and GSASIIpath.GetConfigValue('debug'):
     1006                    print('Packages used to create .GPX file:')
     1007                    for p in sorted(datum[1]['PythonVersions'],key=lambda s: s.lower()):
     1008                        print("{:>14s}: {:s}".format(p,datum[1]['PythonVersions'][p]))
    10051009            for datus in data[1:]:
    10061010                sub = G2frame.PatternTree.AppendItem(Id,datus[0])
     
    10391043        file = open(G2frame.GSASprojectfile,'wb')
    10401044        print 'save to file: ',G2frame.GSASprojectfile
    1041         # stick the file name into the tree, if possible
     1045        # stick the file name into the tree and version info into tree so they are saved.
     1046        # (Controls should always be created at this point)
    10421047        try:
    10431048            Controls = G2frame.PatternTree.GetItemPyData(
     
    10451050            Controls['LastSavedAs'] = os.path.abspath(G2frame.GSASprojectfile)
    10461051            Controls['LastSavedUsing'] = str(GSASIIpath.GetVersionNumber())
     1052            Controls['PythonVersions'] = G2frame.PackageVersions
    10471053        except:
    10481054            pass
Note: See TracChangeset for help on using the changeset viewer.