Changeset 903 for trunk/GSASII.py


Ignore:
Timestamp:
May 13, 2013 3:18:21 PM (9 years ago)
Author:
toby
Message:

Fix problem with large constraints; Change binding of data item menus so they can be used from any window (Mac only); Start on AUI notebook (not in use); fix periodic table on Mac; capture error if argument file is not found; start on sphinx documentation formatting

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/GSASII.py

    r891 r903  
    99# $Id$
    1010########### SVN repository information ###################
     11'''
     12*GSAS-II Main Module*
     13=====================
     14
     15Main routines for the GSAS-II program
     16'''
    1117
    1218import os
     
    101107
    102108class GSASII(wx.Frame):
    103    
     109    '''Define the main GSAS-II frame and its associated menu items
     110    '''
    104111    def _Add_FileMenuItems(self, parent):
    105112        item = parent.Append(
     
    11011108            self.dirname = os.path.dirname(arg[1])
    11021109            if self.dirname: os.chdir(self.dirname)
    1103             G2IO.ProjFileOpen(self)
    1104             self.PatternTree.Expand(self.root)
    1105             for item in self.Refine: item.Enable(True)
    1106             for item in self.SeqRefine: item.Enable(True)
     1110            try:
     1111                G2IO.ProjFileOpen(self)
     1112                self.PatternTree.Expand(self.root)
     1113                for item in self.Refine: item.Enable(True)
     1114                for item in self.SeqRefine: item.Enable(True)
     1115            except:
     1116                print 'Error opening file',arg[1]
    11071117
    11081118    def OnSize(self,event):
     
    23272337
    23282338class GSASIImain(wx.App):
     2339    '''Defines a wxApp for GSAS-II
     2340
     2341    Creates a wx frame (self.main) which contains the display of the
     2342    data tree.
     2343    '''
    23292344    def OnInit(self):
     2345        '''Called automatically when the app is created.'''
    23302346        self.main = GSASII(None)
    23312347        self.main.Show()
     
    23342350
    23352351def main():
     2352    '''Start up the GSAS-II application'''
    23362353    application = GSASIImain(0)
    23372354    if wxInspector: wxeye.InspectionTool().Show()
     
    23412358   
    23422359if __name__ == '__main__':
    2343     main()
     2360    main() # start the GUI
Note: See TracChangeset for help on using the changeset viewer.