Interface compatible with PromptInterface for doing non-ncurses interaction.
By convention, the last line of a text parameter should be a short value with a trailing colon so that we can prompt a user for a value immediately after it.
Makes a dialog.Dialog compatible class based on configuration.
Gives the user a non-blocking message; useful if you are about to do an operation that will take some time.
Request a free-form, single line of text from the user. Prompt the user using text; and init is the initial value filling the field; not all implementations support editing init. Returns the typed string.
Request a selection from a number of choices from the user. Prompt the user using text; choices is a list of tuples of form (value to return, description), where value to return is the value that this function will return.
Gives the user a message that they must dismiss before proceeding.
Securely requests a password from the user. Prompts the user using text; return value is the password.
Convenience wrapper for textwrap.fill() that preserves paragraphs.
Guesses the dimensions that any given piece of text will need to display on terminal, given some width.
Joins a list of disjunctions into a human readable sentence.
>>> join_or(['foo']) 'foo' >>> join_or(['foo', 'bar', 'baz']) 'foo, bar or baz'
Convenience decorator that automatically:
- Removes already handled keyword arguments,
- Configures the dimensions of the dialog box, and
- Handles the different ext possibilities of dialog.
Convenience decorator that handles end-of-document and interrupts.
Base error class.
Non-interactive, but we needed more info.
Dialog returned a mysterious error.