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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1766 - (show annotations)
Wed Oct 1 09:52:28 2003 UTC (21 years, 5 months ago) by jan
Original Path: trunk/thuban/Thuban/UI/main.py
File MIME type: text/x-python
File size: 1439 byte(s)
Remove the #! line as
it annoys lintian which warns about these files not being
executable. The #! isn't necessary here since if you absolutely
must execute them you can always say "python <filename>".

1 # Copyright (C) 2001, 2002, 2003 by Intevation GmbH
2 # Authors:
3 # Jan-Oliver Wagner <[email protected]>
4 # Bernhard Herzog <[email protected]>
5 #
6 # This program is free software under the GPL (>=v2)
7 # Read the file COPYING coming with Thuban for details.
8
9 """
10 The main entry point for the Thuban GUI.
11 """
12
13 __version__ = "$Revision$"
14
15 import sys
16
17 from application import ThubanApplication
18 import Thuban.version
19
20 def main():
21 """Instantiate the application object and run the application"""
22
23 if verify_versions():
24 app = ThubanApplication(0)
25 if len(sys.argv) > 1:
26 app.OpenSession(sys.argv[1])
27 app.MainLoop()
28 # sys.excepthook is set in ThubanApplication.OnInit()
29 sys.excepthook = sys.__excepthook__
30
31 def verify_versions():
32 """Check some library versions.
33
34 Print a message containing any libraries which are wrong.
35 Return True if everything is OK, otherwise False.
36 """
37
38 errors = Thuban.version.verify_versions()
39
40 if len(errors) > 0:
41 msg = " The following version errors were detected:"
42
43 for e in errors:
44 msg += "\n " + e
45
46 # if use_msg_box:
47 # # XXX: use a message box to display the errors
48 # pass
49
50 print "\n*******************************************************"
51 print msg
52 print "*******************************************************\n"
53
54 return False
55
56 return True

Properties

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

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26