4.17. 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

4.17.1. Module Attributes

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

4.17.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