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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 226 - (hide annotations)
Thu Jul 18 16:26:11 2002 UTC (22 years, 7 months ago) by bh
Original Path: trunk/thuban/Thuban/UI/main.py
File MIME type: text/x-python
File size: 1237 byte(s)
	* Thuban/UI/main.py (main): app no longer needs to be global

1 bh 6 #! /usr/bin/python
2 bh 226 # Copyright (C) 2001, 2002 by Intevation GmbH
3 bh 6 # Authors:
4     # Jan-Oliver Wagner <[email protected]>
5     # Bernhard Herzog <[email protected]>
6     #
7     # This program is free software under the GPL (>=v2)
8     # Read the file COPYING coming with Thuban for details.
9    
10     """
11     The main entry point for the Thuban GUI.
12     """
13    
14     __version__ = "$Revision$"
15    
16     import sys
17    
18     # import wxPython.wx here to get the side effects of the wxPython
19     # import, especially setting the locale to the user's defaults throught
20     # GTK. We then set the locale again to the user's defaults, but this
21     # time we're going through the standard python locale module, so all the
22     # magic necessary to make python work properly is done. Without this,
23     # something harmless like float("1.2") may fail when run under a non-C
24     # locale like de_DE
25     import wxPython.wx
26 bh 19 try:
27     import locale
28     locale.setlocale(locale.LC_ALL, "")
29     except ImportError:
30     # the locale module may not be available on some systems
31     pass
32 bh 6
33     from application import ThubanApplication
34    
35     def main():
36     """Instantiate the application object and run the application"""
37     app = ThubanApplication(0)
38     if len(sys.argv) > 1:
39     app.OpenSession(sys.argv[1])
40 bh 39 app.top.ShowSessionTree()
41 bh 6 app.MainLoop()

Properties

Name Value
svn:eol-style native
svn:keywords Author Date Id Revision

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26