Skip to content

I get back my prompt when my script is started by Trogon #106

@bigbirdcode

Description

@bigbirdcode

I have the following example script:

import time

import click
from trogon import tui


@tui()
@click.command()
def cli():
    time.sleep(2)  # simulating some longer task
    click.echo("Hello from trogon-try!")
    click.echo("This is the second output line.")


if __name__ == "__main__":
    cli()

When I execute it with Trogon then Trogon starts the execution of my script, but meanwhile I get back the prompt. So my script is running in the background and writing to the console. This is really confusing and can be the source of errors.

See in the below screenshot how it looks.

Image

Note: I'm using Windows.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions