source: trunk/GSASII.py @ 3995

Last change on this file since 3995 was 3858, checked in by toby, 6 years ago

stupid Py3 syntax error; docs updates

  • Property svn:eol-style set to native
  • Property svn:executable set to *
  • Property svn:keywords set to Date Author Revision URL Id
File size: 1.5 KB
Line 
1#!/usr/bin/env python
2# -*- coding: utf-8 -*-
3#GSASII
4########### SVN repository information ###################
5# $Date: 2019-03-19 14:18:53 +0000 (Tue, 19 Mar 2019) $
6# $Author: vondreele $
7# $Revision: 3858 $
8# $URL: trunk/GSASII.py $
9# $Id: GSASII.py 3858 2019-03-19 14:18:53Z vondreele $
10########### SVN repository information ###################
11'''
12*GSAS-II GUI*
13=====================
14
15This is the script to start the GSAS-II graphical user interface (GUI).
16This script imports GSASIIpath, does some minor initialization
17and then launches :func:`GSASIIdataGUI.GSASIImain`,
18which creates a wx.Application that in turns creates the GUI.
19If the GSAS-II binaries are not installed or are incompatible with
20the OS/Python packages, the user is asked if they should be updated
21from the subversion site.
22'''
23
24import platform
25import GSASIIpath
26
27__version__ = '1.0.0'
28
29if __name__ == '__main__':
30    try:
31        GSASIIpath.SetBinaryPath(True)
32    except:
33        print('Unable to run with current setup, do you want to update to the')
34        try:
35            if '2' in platform.python_version_tuple()[0]:           
36                ans = raw_input("latest GSAS-II version? Update ([Yes]/no): ")
37            else:
38                ans = input("latest GSAS-II version? Update ([Yes]/no): ")               
39        except:
40            ans = 'no'
41        if ans.strip().lower() == "no":
42            import sys
43            print('Exiting')
44            sys.exit()
45        print('Updating...')
46        GSASIIpath.svnUpdateProcess()
47    GSASIIpath.SetVersionNumber("$Revision: 3858 $")
48    GSASIIpath.InvokeDebugOpts()
49    import GSASIIdataGUI as G2gd   
50    G2gd.GSASIImain() # start the GUI
Note: See TracBrowser for help on using the repository browser.