CLInterface Implementation¶
CLI User Interface Implementation
- class dput.interfaces.cli.CLInterface¶
Concrete implementation of the command line user interface.
- boolean(title, message, question_type=['yes', 'no'], default=None)¶
- button_to_str(button)¶
Translate a button name to it’s label value.
- initialize(**kwargs)¶
- list(title, message, selections=[])¶
- message(title, message, question_type='ok')¶
- question(title, message, echo_input=True)¶
- shutdown()¶
- str_to_button(str_button, default)¶
Translate a string input to a button known to the interface. In case of the CLI interface there is no straight notion of a button, so this is abstracted by expected data input treated as button.
This method guesses based on the supplied argument and the supplied default value, which button the user meant in ‘Do you wanna foo [y/N]?’ situations.