blob: e49c099668c7cd3bfd58751e3329c46dc11788ea (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
|
#!/usr/bin/env python
# -*- coding: iso8859-15 -*-
import sys
#
# module global vars and functions
#
__author__ = "Michael 'Mickey' Lauer <mickey@vanille.de>"
__version__ = "0.0.1"
def fail( reason ):
print "ERROR:", reason
sys.exit( -1 )
#
# sanity check Qt and PyQt
#
try:
from qt import *
except ImportError:
fail( "Can't import the qt module. You need to have PyQt (http://riverbankcomputing.co.uk) 3.10 or later installed." )
sys.exit( -1 )
try:
PYQT_VERSION_STR
except NameError:
fail( "Your PyQt (%s) is too old. Please upgrade to PyQt 3.10 or later." % PYQT_VERSION )
major, minor = PYQT_VERSION_STR.split( '.' )
if int(major) < 3 or ( int(major) == 3 and int(minor) < 10 ):
fail( "Your PyQt (%s) is too old. Please upgrade to PyQt 3.10 or later." % PYQT_VERSION_STR )
import sys
try:
from commander.mainwindow import MainWindow
except ImportError:
fail( "Can't load the GUI parts. Did you 'qmake commander.pro && make' in $OEDIR/commander/?" )
from qt import *
#------------------------------------------------------------------------#
# main
#------------------------------------------------------------------------#
from commander.application import CommanderApplication
app = CommanderApplication( sys.argv )
app.initialize()
app.run()
|