/[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 39 - (hide annotations)
Thu Sep 6 17:18:22 2001 UTC (23 years, 6 months ago) by bh
Original Path: trunk/thuban/Thuban/UI/main.py
File MIME type: text/x-python
File size: 1246 byte(s)
Create the session tree view in main with the new mainwindow method
ShowSessionTree and not directly the application's OnInit method

1 bh 6 #! /usr/bin/python
2     # Copyright (C) 2001 by Intevation GmbH
3     # 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     global app
38     app = ThubanApplication(0)
39     if len(sys.argv) > 1:
40     app.OpenSession(sys.argv[1])
41 bh 39 app.top.ShowSessionTree()
42 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