simpleio
– Common I/O interactions#
This library provides basic user/machine interactions. It helps to work with 3 kind of streams:
Input
Output
Errors
It also enables the usage of input storage, for its usage on the output stream.
Functions#
- program_exit(msg)#
- Parameters
msg – The message to exit, or an exit code.
Exit with a message, or an exit code. That way, you can exit by yourself.
- print_text(*txt)#
- Parameters
txt – The text to be printed on the screen. Multiple arguments are allowed.
Print a simple text on the screen, without adding a newline.
- print_line(*txt)#
- Parameters
txt – The text to be printed on the screen. Multiple arguments are allowed.
New since 1.1.0.
Print a simple text on the screen, with adding a newline.
- store_input(msg)#
- Parameters
msg – The message to prompt the input.
Store an input, prompted with message msg. The input will keep safe until requested, or called for storage in a variable.
- warning(msg)#
- Parameters
msg – The message to show.
New since 1.2.0.
Shows a warning using :py:function:`diddiparser2.messages.show_warning`.