#!/usr/bin/python import sys externalModules = [ "pygtk", "gtk", "gtk.glade", "gobject", "pygst", "gobject", "traceback", "tempfile", "ConfigParser", "types", "math", "cairo", "pango", "xml.dom.minidom", "threading", "dbus", "time", "random" ] internalModules = [ "Globals", "InstrumentViewer", "Project", "MixerStrip", "EventViewer", "EventLaneViewer", "Waveform", "TimeLine", "AddInstrumentDialog", "TimeView", "RecordingView", "CompactMixView", "DetailedMixView", "PreferencesDialog", "NewProjectDialog", "WelcomeDialog", "VUWidget", "TransportManager", "CommandManager" ] require = { "pygtk": 'pygtk.require("2.0")', "pygst": 'pygst.require("0.10")' } everythingOkay = True def checkModules(modules): global everythingOkay for module in modules: print "Checking for", module + "...", try: exec("import " + module) if require.has_key(module): exec(require[module]) print "OK" except: everythingOkay = False print "No" print " Cannot locate module " + module + "." print "Checking External Modules:" checkModules(externalModules) if not everythingOkay: print "###############################################################" print "# Jokosher will not run! #" print "# Please install the missing modules before running Jokosher. #" print "# You can find more information at . #" print "###############################################################" sys.exit() print "##################################################################" print "# Jokosher will run! #" print "# Thanks for choosing Jokosher! #" print "# You can find more information at http://www.jokosher.org/ #" print "##################################################################"