Bases: builtins.object
Colorizing helper for various kinds of content we need to handle
Render a piece of text with custom ANSI styling sequence
Parameters: |
|
---|---|
Returns: | A combination of ansi_code, text and a fixed reset sequence that resets text styles. |
Note
When the colorizer is not really doing anything (see is_enabled()) then custom text is not used at all. This is done to ensure that any custom styling is not permantently enabled if colors are to be disabled.
Bases: builtins.object
Bases: builtins.object
Bases: builtins.object
ANSI control codes for various useful stuff. Reference source: wikipedia
Bases: builtins.object
Background color attributes
Get ansi_on if stdout is a tty, ansi_off otherwise.
Parameters: | stream – Alternate stream to use (sys.stdout by default) |
---|---|
Returns: | ansi_on or ansi_off, depending on if the stream being a tty or not. |
alias of s
alias of s