|
| | configure (cls, color=True, apimode=False) |
| | Initializes printer, for terminal output or library mode.
|
| |
| | debug (cls, text="", *args, **kwargs) |
| | Prints debug text to stderr, or logs to logger if APIMODE.
|
| |
| | error (cls, text="", *args, **kwargs) |
| | Prints error to stderr, formatted with args and kwargs, in error colors if supported.
|
| |
| | flush (cls) |
| | Ends current open line, if any.
|
| |
| | init_terminal (cls) |
| | Initializes terminal for color output, or disables color output if unsupported.
|
| |
| | log (cls, level, text="", *args, **kwargs) |
| | Prints text to stderr, or logs to logger if APIMODE.
|
| |
| | print (cls, text="", *args, **kwargs) |
| | Prints text, formatted with args and kwargs.
|
| |
| | warn (cls, text="", *args, **kwargs) |
| | Prints warning to stderr, or logs to logger if APIMODE.
|
| |
Prints to console, supports color output.
If configured with apimode=True, logs debugs and warnings to logger and raises errors.
Definition at line 80 of file common.py.
| configure |
( |
|
cls, |
|
|
|
color = True, |
|
|
|
apimode = False |
|
) |
| |
Initializes printer, for terminal output or library mode.
For terminal output, initializes terminal colors, or disables colors if unsupported.
- Parameters
-
| color | True / False / None for auto-detect from TTY support; will be disabled if terminal does not support colors |
| apimode | whether to log debugs and warnings to logger and raise errors, instead of printing |
Definition at line 131 of file common.py.