Changeset 2404


Ignore:
Timestamp:
Aug 2, 2016 11:32:29 PM (5 years ago)
Author:
toby
Message:

Fix problem saving windows paths

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/GSASIIctrls.py

    r2401 r2404  
    34873487                fp.write(var + ' = ' + str(vars[var][1])+'\n')
    34883488            except: # must be a string
    3489                 fp.write(var + ' = "' + str(vars[var][1])+'"\n')
     3489                varstr = vars[var][1]
     3490                if '\\' in varstr:
     3491                    fp.write(var + ' = os.path.normpath("' + varstr.replace('\\','/') +'")\n')
     3492                else:
     3493                    fp.write(var + ' = "' + str(varstr)+'"\n')
    34903494        if vars[var][3]:
    34913495            fp.write("'''" + str(vars[var][3]) + "\n'''\n\n")
     
    38503854    ['TOF-CW Joint Refinement', 'TOF combined XN Rietveld refinement in GSAS.htm', 'Combined X-ray/TOF-neutron Rietveld refinement'],
    38513855    ['SeqRefine', 'SequentialTutorial.htm', 'Sequential refinement of multiple datasets'],
    3852     ['SeqParametric', 'ParametricFitting.htm', 'Parametric Fitting and Pseudo Variables for Sequential Fits'],
     3856    ['SeqParametric', 'ParametricFitting.htm', '     Parametric Fitting and Pseudo Variables for Sequential Fits'],
    38533857       
    38543858    ['StackingFaults-I', 'Stacking Faults-I.htm', 'Stacking fault simulations for diamond'],
     
    39883992            return
    39893993        choices = [tutorialCatalog[i][2] for i in indices]
    3990         print len(tutorialCatalog),len(choices)
    39913994        selected = self.ChooseTutorial(choices)
    39923995        if selected is None: return
  • trunk/GSASIIpath.py

    r2401 r2404  
    9191except ImportError:
    9292    configDict = {}
     93except Exception as err:
     94    print("Error importing config.py file: "+str(err))
     95    configDict = {}
    9396   
    9497def GetConfigValue(key,default=None):
Note: See TracChangeset for help on using the changeset viewer.