Changeset 3167


Ignore:
Timestamp:
Nov 29, 2017 10:42:44 PM (4 years ago)
Author:
toby
Message:

Misc Py3 fixes

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/GSASIIctrlGUI.py

    r3161 r3167  
    36773677        "Display an 'About GSAS-II' box"
    36783678        import GSASII
    3679         info = wx.AboutDialogInfo()
     3679        try:
     3680            import wx.adv as wxadv  # AboutBox moved here in Phoenix
     3681        except:
     3682            wxadv = wx
     3683        info = wxadv.AboutDialogInfo()
    36803684        info.Name = 'GSAS-II'
    36813685        ver = GSASIIpath.svnGetRev()
    3682         if ver:
    3683             info.Version = 'Revision '+str(ver)+' (svn), version '+GSASII.__version__
    3684         else:
    3685             info.Version = 'Revision '+str(GSASIIpath.GetVersionNumber())+' (.py files), version '+GSASII.__version__
     3686        if not ver:
     3687            ver = GSASIIpath.GetVersionNumber()
     3688        info.SetVersion(ver)
    36863689        #info.Developers = ['Robert B. Von Dreele','Brian H. Toby']
    36873690        info.Copyright = ('(c) ' + time.strftime('%Y') +
     
    37023705'''
    37033706        info.WebSite = ("https://subversion.xray.aps.anl.gov/trac/pyGSAS","GSAS-II home page")
    3704         wx.AboutBox(info)
     3707        wxadv.AboutBox(info)
    37053708
    37063709    def OnCheckUpdates(self,event):
  • trunk/GSASIIpath.py

    r3154 r3167  
    169169    # add likely places to find subversion when installed with GSAS-II
    170170    pathlist = os.environ["PATH"].split(os.pathsep)
    171     pathlist.append(os.path.split(sys.executable)[0])
    172     pathlist.append(path2GSAS2)
     171    pathlist.insert(0,os.path.split(sys.executable)[0])
     172    pathlist.insert(1,path2GSAS2)
    173173    for rpt in ('..','bin'),('..','Library','bin'),('svn','bin'),('svn',),('.'):
    174174        pt = os.path.normpath(os.path.join(path2GSAS2,*rpt))
     
    207207        print ('err=%s'%err)
    208208        return None
    209     return out.strip()
     209    return out.strip().decode()
    210210
    211211def svnVersionNumber(svn=None):
     
    525525    res,err = p.communicate()
    526526    versions = {}
    527     for d in res.split():
     527    for d in res.decode().split():
    528528        if d.startswith(bindir):
    529529            v = intver(d.rstrip('/').split('_')[3].lstrip('n'))
Note: See TracChangeset for help on using the changeset viewer.