def main(): '''Turn on the DBus Mainloop and start the program''' #turn on the dbus mainloop DBusGMainLoop(set_as_default=True) #constructor for your class instances options = parse_options() app = Application(options.gui) app.start_app()