示例#1
0
def wand(delay=0):
    def on_finish(automagica_id):
        print(f"Automagica ID: {automagica_id}")
        os._exit(0)

    app = WandApp(delay=delay, on_finish=on_finish)
    app.run()
示例#2
0
def wand(delay=0):
    """
    `automagica wand` launches the Automagica Wand
    """
    def on_finish(automagica_id):
        """
        Callback function when Automagica Wand is closed
        """
        print(f"Automagica ID: {automagica_id}")
        os._exit(0)

    app = WandApp(delay=delay, on_finish=on_finish)
    app.run()
示例#3
0
def wand_app():
    """ Testing fixture for the Flow app """
    app = WandApp()

    yield app

    app.destroy()
    app.quit()
示例#4
0
def wand(delay=0):
    """
    `automagica wand` launches the Automagica Wand
    """
    def on_finish(automagica_id):
        """
        Callback function when Automagica Wand is closed
        """
        print(f"Automagica ID: {automagica_id}")
        os._exit(0)

    root = AutomagicaTk()
    _ = WandApp(root, delay=delay, on_finish=on_finish)
    root.mainloop()
示例#5
0
def wand_app():
    """Testing fixture for the Flow app"""
    app = WandApp(pytest.automagica_tk)

    app.update()

    yield app

    app.destroy()
示例#6
0
    # Automagica Flow (automagica://flow/new)
    if parts[0] == "flow":
        if parts[1] == "new":
            app = FlowApp()
            app.run()

    # Automagica Lab (automagica://lab/new)
    if parts[0] == "lab":
        if parts[1] == "new":
            app = LabApp()
            app.new()

    # Automagica Wand (automagica://wand)
    if parts[0] == "wand":
        app = WandApp()
        app.run()

    # Automagica Bot (automagica://bot/bot_secret/ABCD12345)
    if parts[0] == "bot":
        config = Config()

        if parts[1] == "bot_secret":
            bot_secret = parts[2]

            config.values["bot_secret"] = bot_secret
            config.save()

        app = BotApp(config=config)

        app.run()
示例#7
0
    if parts[0] == "flow":
        if parts[1] == "new":
            root = AutomagicaTk()
            _ = FlowApp(root)
            root.mainloop()

    # Automagica Lab (automagica://lab/new)
    if parts[0] == "lab":
        if parts[1] == "new":
            app = LabApp()
            app.new()

    # Automagica Wand (automagica://wand)
    if parts[0] == "wand":
        root = AutomagicaTk()
        _ = WandApp(root)
        root.mainloop()

    # Automagica Bot (automagica://bot/bot_secret/ABCD12345)
    if parts[0] == "bot":
        config = Config()

        # Bot secret specified
        if parts[1] == "bot_secret":
            bot_secret = parts[2]

            config.values["bot_secret"] = bot_secret
            config.save()

        root = AutomagicaTk(config=config)
        app = BotApp(root)