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)
See dput.interface.AbstractInterface.boolean()
-
button_to_str(button)
Translate a button name to it’s label value.
-
initialize(**kwargs)
See dput.interface.AbstractInterface.initialize()
-
list(title, message, selections=[])
See dput.interface.AbstractInterface.list()
-
message(title, message, question_type='ok')
See dput.interface.AbstractInterface.message()
-
question(title, message, echo_input=True)
See dput.interface.AbstractInterface.question()
-
shutdown()
See dput.interface.AbstractInterface.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.