Changeset 1696 for trunk/GSASIIctrls.py


Ignore:
Timestamp:
Mar 11, 2015 11:30:57 PM (7 years ago)
Author:
toby
Message:

more work on seq. ref. with differing variables; rework svn interface; fix tutorial downloads

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/GSASIIctrls.py

    r1692 r1696  
    19621962    ['TOF Charge Flipping', 'TOF Charge Flipping', 'Charge Flipping with TOF single crystal data in GSASII.htm',
    19631963     'Charge flipping with neutron TOF single crystal data'],
     1964    ['TOF-CW Joint Refinement', 'TOF-CW Joint Refinement', 'TOF combined XN Rietveld refinement in GSAS.htm', 'Combined XN Rietveld refinement with TOF data'],
    19641965    ['TOF Sequential Single Peak Fit', 'TOF Sequential Single Peak Fit', '', ''],
    19651966    ['TOF Single Crystal Refinement', 'TOF Single Crystal Refinement', '', ''],
    1966     ['TOF-CW Joint Refinement', 'TOF-CW Joint Refinement', '', ''],
    19671967    )
    19681968if GSASIIpath.GetConfigValue('Tutorial_location'):
     
    19701970else:
    19711971    tutorialPath = GSASIIpath.path2GSAS2
    1972    
     1972
    19731973class OpenTutorial(wx.Dialog):
    19741974    '''Open a tutorial, optionally copying it to the local disk. Always copy
     
    20622062        '''
    20632063        self.BrowseMode = self.mode.GetSelection()
    2064         #self.FillListBox()
    2065     #def FillListBox(self):
    20662064        if self.BrowseMode == 3:
    20672065            import glob
    2068             filelist = glob.glob(tutorialPath+'/help/*/*.htm')
     2066            filelist = glob.glob(os.path.join(tutorialPath,'help','*','*.htm'))
    20692067            taillist = [os.path.split(f)[1] for f in filelist]
    20702068            itemlist = [tut[-1] for tut in tutorialCatalog if tut[2] in taillist]
     
    20952093                return
    20962094        self.dataLoc.SetLabel(tutorialPath)
     2095        self.EndModal(wx.ID_OK)
    20972096        if self.BrowseMode == 0:
    20982097            # xfer data & web page locally, then open web page
     
    21162115        else:
    21172116            raise Exception("How did this happen!")
    2118         self.EndModal(wx.ID_OK)
    21192117    def ValidateTutorialDir(self,fullpath=tutorialPath,baseURL=G2BaseURL):
    21202118        '''Load help to new directory or make sure existing directory looks correctly set up
     
    21392137    def LoadTutorial(self,tutorialname,fullpath=tutorialPath,baseURL=G2BaseURL):
    21402138        'Load a Tutorial to the selected location'
    2141         if GSASIIpath.svnSwitchDir("help/"+tutorialname,baseURL+"/Tutorials/"+tutorialname,fullpath):
     2139        if GSASIIpath.svnSwitchDir("help",tutorialname,baseURL+"/Tutorials",fullpath):
    21422140            return True
    21432141        raise Exception("Problem transferring Tutorial from web")
     
    21452143    def LoadExercise(self,tutorialname,fullpath=tutorialPath,baseURL=G2BaseURL):
    21462144        'Load Exercise file(s) for a Tutorial to the selected location'
    2147         if GSASIIpath.svnSwitchDir("Exercises/"+tutorialname,baseURL+"/Exercises/"+tutorialname,fullpath):
     2145        if GSASIIpath.svnSwitchDir("Exercises",tutorialname,baseURL+"/Exercises",fullpath):
    21482146            return True
    21492147        raise Exception("Problem transferring Exercise from web")
Note: See TracChangeset for help on using the changeset viewer.