Widgets#

ExecutingAsyncWindow#

class tk_async_execute.widget.ExecutingAsyncWindow(coro: Coroutine, visible: bool = True, pop_up: bool = False, callback: Callable | None = None, *args, **kwargs)#

Window that hovers while executing async methods.

Note

Direct usage of this is not recommended. Use tk_async_execute.async_execute() instead.

Parameters:
  • coro (Coroutine) – The coro to run.

  • visible (Optional[bool]) – Show the execution progress through a new window. Defaults to True.

  • pop_up (Optional[bool]) – If True, all other windows will be blocked from interactions, until the execution of coro is complete. Defaults to False.

  • callback (Optional[Callable]) – Callback function to call with result afer coro has finished. Defaults to None.

  • args (Any) – Other positional arguments passed to tkinter.Toplevel

  • kwargs (Any) – Other keyword arguments passed to tkinter.Toplevel

Raises:

RuntimeError – Loop has not been started, use ‘tk_async_execute.start()’ first.