예제 #1
0
def main(store=False, metadata=False, port=6601):
    win = Gtk.Window()

    # Connect to the test-server
    boot_base(
        verbosity=logging.DEBUG,
        protocol_machine='idle',
        host='localhost',
        port=port
    )

    if store:
        boot_store()

    if metadata:
        boot_metadata()

    win.connect('destroy', Gtk.main_quit)

    try:
        yield win
    except:
        raise
    else:
        win.show_all()
        Gtk.main()
    finally:
        shutdown_application()