6.23. foundations.shell

shell.py

Platform:
Windows, Linux, Mac Os X.
Description:
Defines various shell manipulation objects.
Others:
ANSI escape codes for colors from: https://wiki.archlinux.org/index.php/Color_Bash_Prompt

6.23.1. Module Attributes

foundations.shell.LOGGER
foundations.shell.BACKGROUND_ANSI_ESCAPE_CODES
foundations.shell.FOREGROUND_ANSI_ESCAPE_CODES
foundations.shell.AnsiEscapeCodes

6.23.2. Functions

foundations.shell.colorize(text, color)[source]

Colorizes given text using given color.

Parameters:
  • text (unicode) – Text to colorize.
  • color (unicode) – ANSI escape code name.
Returns:

Colorized text.

Return type:

unicode