#!/usr/bin/env python # -*- coding: iso8859-15 -*- import sys # # module global vars and functions # __author__ = "Michael 'Mickey' Lauer " __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()