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]> |
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() |