scriptor.dialog

Dialogs API.

This module provides several dialogs to be used for several user-interactions.

  • alert: Show a modal message to be confirmed

  • confirm: Show a Yes-No or Yes-No-Cancel dialog

  • input: Input dialog with various types

  • select: Select choice of several options, with multi-selection option.

Module Contents

Functions

wait()

alert(→ None)

Provide a message and stop program execution until accepted.

confirm(→ bool | None)

Provide a Yes-No or Yes-No-Cancel-dialog.

input(→ datetime.datetime | str | float | int)

Provide a dialog asking for some value.

input_date(→ datetime.datetime)

Provide a input asking for datetime value.

input_number(→ int | float)

input_string(→ str)

input_text(→ str)

select(→ str | list[str])

diffcmp(→ None)

table(→ str | list[str] | None)

async scriptor.dialog.wait()
async scriptor.dialog.alert(text: str, image: str = '') None

Provide a message and stop program execution until accepted.

async scriptor.dialog.confirm(text: str, *, title: str = 'Confirm', allow_cancel: bool = False, image: str = '') bool | None

Provide a Yes-No or Yes-No-Cancel-dialog.

async scriptor.dialog.input(text: str, *, title: str = 'Input', type: str = 'input', use_time: bool = False, empty: bool = False, image: str = '') datetime.datetime | str | float | int

Provide a dialog asking for some value.

async scriptor.dialog.input_date(*args, **kwargs) datetime.datetime

Provide a input asking for datetime value.

async scriptor.dialog.input_number(*args, **kwargs) int | float
async scriptor.dialog.input_string(*args, **kwargs) str
async scriptor.dialog.input_text(*args, **kwargs) str
async scriptor.dialog.select(text: str, choices: tuple[str] | list[str] | dict[str, str], *, title: str = 'Select', multiple: bool = False, image: str = '') str | list[str]
async scriptor.dialog.diffcmp(title: str, changes: list[list[str]], image: str = '') None
async scriptor.dialog.table(header: list[str], rows: list[list[str]], *, select=False, multiple=False, image: str = '') str | list[str] | None