Changeset 4148 for trunk/GSASII.py
- Timestamp:
- Sep 13, 2019 5:06:45 PM (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/GSASII.py
r3858 r4148 14 14 15 15 This is the script to start the GSAS-II graphical user interface (GUI). 16 This script imports GSASIIpath, does some minor initialization 17 and then launches :func:`GSASIIdataGUI.GSASIImain`, 18 which creates a wx.Application that in turns creates the GUI. 19 If the GSAS-II binaries are not installed or are incompatible with 20 the OS/Python packages, the user is asked if they should be updated 21 from the subversion site. 16 This script imports GSASIIpath, which does some minor initialization 17 and then (before any wxPython calls can be made) creates a wx.App application. 18 A this point :func:`GSASIIpath.SetBinaryPath` is called to establish 19 the directory where GSAS-II binaries are found. If the binaries 20 are not installed or are incompatible with the OS/Python packages, 21 the user is asked if they should be updated from the subversion site. 22 The wxPython app is then passed to :func:`GSASIIdataGUI.GSASIImain`, 23 which creates the GSAS-II GUI and finally the event loop is started. 22 24 ''' 23 25 24 26 import platform 27 import wx 25 28 import GSASIIpath 29 GSASIIpath.SetVersionNumber("$Revision$") 26 30 27 31 __version__ = '1.0.0' 28 32 29 33 if __name__ == '__main__': 34 application = wx.App(0) # create the GUI framework 30 35 try: 31 36 GSASIIpath.SetBinaryPath(True) … … 45 50 print('Updating...') 46 51 GSASIIpath.svnUpdateProcess() 47 GSASIIpath.SetVersionNumber("$Revision$")48 52 GSASIIpath.InvokeDebugOpts() 49 53 import GSASIIdataGUI as G2gd 50 G2gd.GSASIImain() # start the GUI 54 G2gd.GSASIImain(application) # start the GUI 55 application.MainLoop()
Note: See TracChangeset
for help on using the changeset viewer.