add executable
authorMichael 'Mickey' Lauer <mickey@vanille-media.de>
Wed, 18 Feb 2004 13:25:00 +0000 (13:25 +0000)
committerMichael 'Mickey' Lauer <mickey@vanille-media.de>
Wed, 18 Feb 2004 13:25:00 +0000 (13:25 +0000)
bin/oecommander

index e69de29..86191bc 100644 (file)
@@ -0,0 +1,48 @@
+#!/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 PyQt
+#
+
+try:
+    from qt import *
+except ImportError:
+    fail( "Can't import the qt module. Do you have PyQt installed?" )
+    sys.exit( -1 )
+
+try:
+    PYQT_VERSION_STR
+except NameError:
+    fail( "PyQt Version %s is too old. Please upgrade to PyQt 3.10 or later." % PYQT_VERSION )
+
+major, minor = PYQT_VERSION_STR.split( '.' )
+if major < 3 or ( major == 3 and minor < 10 ):
+    fail( "PyQt Version %s is too old. Please upgrade to PyQt 3.10 or later." % PYQT_VERSION_STR )
+
+import sys
+from commander.mainwindow import MainWindow
+from qt import *
+
+#------------------------------------------------------------------------#
+# main
+#------------------------------------------------------------------------#
+
+app = QApplication( sys.argv )
+mw = MainWindow()
+mw.show()
+app.setMainWidget( mw )
+app.exec_loop()
+