repype.textual.demo

class repype.textual.demo.Demo(app: App, **kwargs)

Bases: object

Helper class to control the app interactively (e.g., within a Jupyter notebook).

Probably only useful for demonstration purposes.

async press(*keys) None

Press the given keys in the app.

screenshot() None

Capture a screenshot of the current state of the app.

The screenshot is embedded in the Jupyter notebook.

async wait(seconds) None

Wait for the number of seconds.

async wait_for_condition(condition: Callable[[], bool]) None

Wait until the given condition is met (polled once per second).

async repype.textual.demo.run(app: App, **kwargs) Demo

Co-routine that runs the app` and returns the Demo object.