ichor.cli.useful_functions package
Submodules
ichor.cli.useful_functions.user_input module
- bool_to_str(b: bool) str
Converts True/False bool to yes/no str
- Parameters:
b – True or False
- Returns:
yes or no str
- user_input_bool(s='Enter True/False: ', default=None) bool | None
Returns True or False depending on user input
- Parameters:
s – A string that is shown in the prompt (printed to standard output).
- user_input_float(s='Enter float: ', default=None) int | None
Returns a float that user has given
- Parameters:
s – A string that is shown in the prompt (printed to standard output).
- user_input_free_flow(s='Enter str: ', default=None) str
Asks user for inputs and returns whatever user has typed
- Parameters:
s – A string that is shown in the prompt (printed to standard output).
- user_input_int(s='Enter integer: ', default=None) int | None
Returns an integer that user has given
- Parameters:
s – A string that is shown in the prompt (printed to standard output).
- user_input_path(s='Enter Path: ', default_path='.') str
Returns user input path.
- Parameters:
s – A string that is shown in the prompt (printed to standard output).
- user_input_restricted(available_options: List[str], s='Enter str: ', default=None) str
Asks user for inputs and returns whatever user has typed
- Parameters:
s – A string that is shown in the prompt (printed to standard output).
Note
Additional info is displayed because the string is modified to show the available options in the function
Module contents
- bool_to_str(b: bool) str
Converts True/False bool to yes/no str
- Parameters:
b – True or False
- Returns:
yes or no str
- user_input_bool(s='Enter True/False: ', default=None) bool | None
Returns True or False depending on user input
- Parameters:
s – A string that is shown in the prompt (printed to standard output).
- user_input_float(s='Enter float: ', default=None) int | None
Returns a float that user has given
- Parameters:
s – A string that is shown in the prompt (printed to standard output).
- user_input_free_flow(s='Enter str: ', default=None) str
Asks user for inputs and returns whatever user has typed
- Parameters:
s – A string that is shown in the prompt (printed to standard output).
- user_input_int(s='Enter integer: ', default=None) int | None
Returns an integer that user has given
- Parameters:
s – A string that is shown in the prompt (printed to standard output).
- user_input_path(s='Enter Path: ', default_path='.') str
Returns user input path.
- Parameters:
s – A string that is shown in the prompt (printed to standard output).
- user_input_restricted(available_options: List[str], s='Enter str: ', default=None) str
Asks user for inputs and returns whatever user has typed
- Parameters:
s – A string that is shown in the prompt (printed to standard output).
Note
Additional info is displayed because the string is modified to show the available options in the function