Skip to main content

Module term

Module term 

Source
Expand description

Terminal helpers — ANSI color gating and POSIX getenv wrappers.

Color policy: NO_COLOR (any value, including empty) disables color; CLICOLOR_FORCE=1 forces it even when stdout is piped. NO_COLOR wins — see https://no-color.org.

Functions§

getenv_nonempty
Convenience getenv — returns None for both unset and empty.
use_color_stderr
Returns true when ANSI color should be rendered on stderr.
use_color_stdout
Returns true when ANSI color should be rendered on stdout.