Terminal Utilities¶
Utilities for working with the terminal.
Module Overview:
encoding - provides the ANSI escape sequence for a terminal attribute
format - wrap text with ANSI for the given colors or attributes
- stem.util.term.Color(enum)¶
- stem.util.term.BgColor(enum)¶
Foreground or background terminal colors.
Color
Description
BLACK
black color
BLUE
blue color
CYAN
cyan color
GREEN
green color
MAGENTA
magenta color
RED
red color
WHITE
white color
YELLOW
yellow color
- stem.util.term.Attr(enum)¶
Terminal text attributes.
Changed in version 1.5.0: Added the LINES attribute.
Attr
Description
BOLD
heavy typeface
HIGHLIGHT
inverted foreground and background
UNDERLINE
underlined text
READLINE_ESCAPE
wrap encodings in RL_PROMPT_START_IGNORE and RL_PROMPT_END_IGNORE sequences
LINES
formats lines individually