j5.backends.console package¶
Subpackages¶
Submodules¶
Module contents¶
Backends for the Console Environment.
-
class
j5.backends.console.
Console
(descriptor: str)[source]¶ Bases:
object
A helper class for console backends.
-
info
(message: str) → None[source]¶ Print information to the user.
Parameters: message – Message to print to the user.
-
read
(prompt: str, return_type: Optional[Type[T]] = <class 'str'>, check_stdin: bool = True) → T[source]¶ Prompt the user for a value of type ‘return_type’.
Parameters: - prompt – Prompt to display to the user.
- return_type – type to cast the input as, defaults to str.
- check_stdin – Check if stdin is available is a tty.
Returns: value of type ‘return_type’.
-