Beispiel #1
0
def run_application():
    setup_logging()
    app.controller = controller.Controller()

    print "Starting up %s" % app.config.get(prefs.LONG_APP_NAME)
    print "Version:    %s" % app.config.get(prefs.APP_VERSION)
    print "OS:         %s %s %s" % (platform.system(), platform.release(),
                                    platform.machine())
    print "Revision:   %s" % app.config.get(prefs.APP_REVISION)
    print "Builder:    %s" % app.config.get(prefs.BUILD_MACHINE)
    print "Build Time: %s" % app.config.get(prefs.BUILD_TIME)

    print
    app.info_updater = InfoUpdater()
    app.cli_events = EventHandler()
    app.cli_events.connect_to_signals()
    startup.install_first_time_handler(app.cli_events.handle_first_time)
    startup.startup()
    app.cli_events.startup_event.wait()
    if app.cli_events.startup_failure:
        print_box("Error Starting Up: %s" % app.cli_events.startup_failure[0])
        print
        print_text(app.cli_events.startup_failure[1])
        app.controller.shutdown()
        return

    setup_movie_data_program_info()
    messages.FrontendStarted().send_to_backend()

    print "Startup complete.  Type \"help\" for list of commands."
    app.cli_interpreter = MiroInterpreter()
    app.cli_interpreter.cmdloop()
    app.controller.shutdown()
Beispiel #2
0
def handle_dialog(dialog):
    print_box("Question: %s" % dialog.title)
    print_text(dialog.description)
    print "   ".join(["[%s]" % button.text for button in dialog.buttons])

    command = DialogAsker(dialog)
    command.cmdloop()
Beispiel #3
0
def run_application():
    setup_logging()
    app.controller = controller.Controller()

    print "Starting up %s" % app.config.get(prefs.LONG_APP_NAME)
    print "Version:    %s" % app.config.get(prefs.APP_VERSION)
    print "OS:         %s %s %s" % (platform.system(), platform.release(), platform.machine())
    print "Revision:   %s" % app.config.get(prefs.APP_REVISION)
    print "Builder:    %s" % app.config.get(prefs.BUILD_MACHINE)
    print "Build Time: %s" % app.config.get(prefs.BUILD_TIME)

    print
    app.cli_events = EventHandler()
    app.cli_events.connect_to_signals()
    startup.startup()
    app.cli_events.startup_event.wait()
    if app.cli_events.startup_failure:
        print_box("Error Starting Up: %s" % app.cli_events.startup_failure[0])
        print
        print_text(app.cli_events.startup_failure[1])
        app.controller.shutdown()
        return
    print "Startup complete.  Type \"help\" for list of commands."
    app.cli_interpreter = MiroInterpreter()
    app.cli_interpreter.cmdloop()
    app.controller.shutdown()
Beispiel #4
0
def run_application():
    setup_logging()
    app.controller = controller.Controller()

    print "Starting up %s" % app.config.get(prefs.LONG_APP_NAME)
    print "Version:    %s" % app.config.get(prefs.APP_VERSION)
    print "OS:         %s %s %s" % (platform.system(), platform.release(),
                                    platform.machine())
    print "Revision:   %s" % app.config.get(prefs.APP_REVISION)
    print "Builder:    %s" % app.config.get(prefs.BUILD_MACHINE)
    print "Build Time: %s" % app.config.get(prefs.BUILD_TIME)

    print
    app.cli_events = EventHandler()
    app.cli_events.connect_to_signals()
    startup.install_first_time_handler(app.cli_events.handle_first_time)
    startup.startup()
    app.cli_events.startup_event.wait()
    if app.cli_events.startup_failure:
        print_box("Error Starting Up: %s" % app.cli_events.startup_failure[0])
        print
        print_text(app.cli_events.startup_failure[1])
        app.controller.shutdown()
        return

    messages.FrontendStarted().send_to_backend()

    print "Startup complete.  Type \"help\" for list of commands."
    app.cli_interpreter = MiroInterpreter()
    app.cli_interpreter.cmdloop()
    app.controller.shutdown()
Beispiel #5
0
 def handle_error(self, obj, report):
     print_box('ERROR')
     print
     print report
     print
Beispiel #6
0
 def handle_download_complete(self, obj, item):
     print_box('Download Complete: %s' % item.get_title())
Beispiel #7
0
 def handle_error(self, obj, report):
     print_box('ERROR')
     print
     print report
     print
Beispiel #8
0
 def handle_download_complete(self, obj, item):
     print_box('Download Complete: %s' % item.get_title())