Inputs

Clinner provides some useful functions to ask for a user input.

bool_input(input_str: str) → str[source]

Prints a message asking for a yes/no response, otherwise it will continue asking.

Parameters:input_str – Message to print.
Returns:User response.
choices_input(input_str: str, choices: List[Any]) → str[source]

Prints a message asking for a choice of given values.

Parameters:
  • input_str – Message to print.
  • choices – Choices.
Returns:

User response.

default_input(input_str: str, default: Any = None) → str[source]

Prints a message offering a default value.

Parameters:
  • input_str – Message to print.
  • default – Default value.
Returns:

User response.