/[thuban]/branches/WIP-pyshapelib-bramz/Thuban/UI/main.py
ViewVC logotype

Diff of /branches/WIP-pyshapelib-bramz/Thuban/UI/main.py

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 6 by bh, Tue Aug 28 15:41:52 2001 UTC revision 230 by bh, Fri Jul 19 13:21:14 2002 UTC
# Line 1  Line 1 
1  #! /usr/bin/python  #! /usr/bin/python
2  # Copyright (C) 2001 by Intevation GmbH  # Copyright (C) 2001, 2002 by Intevation GmbH
3  # Authors:  # Authors:
4  # Jan-Oliver Wagner <[email protected]>  # Jan-Oliver Wagner <[email protected]>
5  # Bernhard Herzog <[email protected]>  # Bernhard Herzog <[email protected]>
# Line 15  __version__ = "$Revision$" Line 15  __version__ = "$Revision$"
15    
16  import sys  import sys
17    
 # import wxPython.wx here to get the side effects of the wxPython  
 # import, especially setting the locale to the user's defaults throught  
 # GTK. We then set the locale again to the user's defaults, but this  
 # time we're going through the standard python locale module, so all the  
 # magic necessary to make python work properly is done. Without this,  
 # something harmless like float("1.2") may fail when run under a non-C  
 # locale like de_DE  
 import wxPython.wx  
 import locale  
 locale.setlocale(locale.LC_ALL, "")  
   
18  from application import ThubanApplication  from application import ThubanApplication
19    
20  def main():  def main():
21      """Instantiate the application object and run the application"""      """Instantiate the application object and run the application"""
     global app  
22      app = ThubanApplication(0)      app = ThubanApplication(0)
23      if len(sys.argv) > 1:      if len(sys.argv) > 1:
24          app.OpenSession(sys.argv[1])          app.OpenSession(sys.argv[1])
25        app.top.ShowSessionTree()
26      app.MainLoop()      app.MainLoop()

Legend:
Removed from v.6  
changed lines
  Added in v.230

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26