/[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 1308 - (show annotations)
Thu Jun 26 17:00:31 2003 UTC (21 years, 8 months ago) by jonathan
Original Path: trunk/thuban/Thuban/UI/main.py
File MIME type: text/x-python
File size: 1346 byte(s)
(wxCHECK_VERSION): Removed. Not needed.
(verify_versions): Remove most of the code since it is
        now in Thuban.version.verify_versions.o

1 #! /usr/bin/python
2 # Copyright (C) 2001, 2002 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 from application import ThubanApplication
19 import Thuban.version
20
21 def main():
22 """Instantiate the application object and run the application"""
23
24 if verify_versions():
25 app = ThubanApplication(0)
26 if len(sys.argv) > 1:
27 app.OpenSession(sys.argv[1])
28 app.MainLoop()
29
30 def verify_versions():
31 """Check some library versions.
32
33 Print a message containing any libraries which are wrong.
34 Return True if everything is OK, otherwise False.
35 """
36
37 errors = Thuban.version.verify_versions()
38
39 if len(errors) > 0:
40 msg = " The following version errors were detected:"
41
42 for e in errors:
43 msg += "\n " + e
44
45 # if use_msg_box:
46 # # XXX: use a message box to display the errors
47 # pass
48
49 print "\n*******************************************************"
50 print msg
51 print "*******************************************************\n"
52
53 return False
54
55 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