Changeset 5269


Ignore:
Timestamp:
May 3, 2022 11:27:16 AM (5 months ago)
Author:
toby
Message:

add config var for pdffit2 and show err message

Location:
trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/GSASIIctrlGUI.py

    r5260 r5269  
    64526452        wx.GetApp().Yield()
    64536453        #print('wx Yield called')
    6454         print('Update:',value,newmsg)
     6454        #print('Update:',value,newmsg)
    64556455        return super(self.__class__,self).Update(value, newmsg)
    64566456       
  • trunk/GSASIIphsGUI.py

    r5257 r5269  
    63576357        PDFfit_exec = G2pwd.findPDFfit()  #returns location of python (not pdffit!)
    63586358        if not PDFfit_exec:
    6359             wx.MessageBox(''' PDFfit2 is currently not available for this platform.
     6359            wx.MessageBox(''' PDFfit2 is not currently installed for this platform.
    63606360    Please contact us for assistance''',caption='No PDFfit2',style=wx.ICON_INFORMATION)
    63616361            return
  • trunk/GSASIIpwd.py

    r5265 r5269  
    31593159    :returns: the full path to a python executable or None, if it was not found.
    31603160    '''
     3161    if GSASIIpath.GetConfigValue('pdffit2_exec') is not None and is_exe(
     3162            GSASIIpath.GetConfigValue('pdffit2_exec')):
     3163        return GSASIIpath.GetConfigValue('pdffit2_exec')
    31613164    try:
    3162         sys.path.append('%s'%GSASIIpath.path2GSAS2)
     3165        if GSASIIpath.path2GSAS2 not in sys.path:
     3166            sys.path.insert(0,GSASIIpath.path2GSAS2)
    31633167        from diffpy.pdffit2 import PdfFit
    31643168        return sys.executable
    3165     except:
     3169    except Exception as msg:
     3170        print('Error from PDFfit2 access:\n',msg)
    31663171        return None
    31673172   
  • trunk/config_example.py

    r5260 r5269  
    255255'''
    256256
     257pdffit2_exec = None
     258'''Defines the full path to a Python executable that has been configured
     259with the PDFfit2 (diffpy) package. If None (the default), GSAS-II will see
     260if PDFfit2 can be imported into the current Python.
     261'''
     262
    257263lastUpdateNotice = 0
    258264'''Defines the version number for the last update notice that has been
Note: See TracChangeset for help on using the changeset viewer.