colorama package¶
Submodules¶
colorama.ansi module¶
This module generates ANSI character codes to printing colors to terminals. See: http://en.wikipedia.org/wiki/ANSI_escape_code
-
class
colorama.ansi.
AnsiBack
[source]¶ Bases :
colorama.ansi.AnsiCodes
-
BLACK
= 40¶
-
BLUE
= 44¶
-
CYAN
= 46¶
-
GREEN
= 42¶
-
LIGHTBLACK_EX
= 100¶
-
LIGHTBLUE_EX
= 104¶
-
LIGHTCYAN_EX
= 106¶
-
LIGHTGREEN_EX
= 102¶
-
LIGHTMAGENTA_EX
= 105¶
-
LIGHTRED_EX
= 101¶
-
LIGHTWHITE_EX
= 107¶
-
LIGHTYELLOW_EX
= 103¶
-
MAGENTA
= 45¶
-
RED
= 41¶
-
RESET
= 49¶
-
WHITE
= 47¶
-
YELLOW
= 43¶
-
-
class
colorama.ansi.
AnsiFore
[source]¶ Bases :
colorama.ansi.AnsiCodes
-
BLACK
= 30¶
-
BLUE
= 34¶
-
CYAN
= 36¶
-
GREEN
= 32¶
-
LIGHTBLACK_EX
= 90¶
-
LIGHTBLUE_EX
= 94¶
-
LIGHTCYAN_EX
= 96¶
-
LIGHTGREEN_EX
= 92¶
-
LIGHTMAGENTA_EX
= 95¶
-
LIGHTRED_EX
= 91¶
-
LIGHTWHITE_EX
= 97¶
-
LIGHTYELLOW_EX
= 93¶
-
MAGENTA
= 35¶
-
RED
= 31¶
-
RESET
= 39¶
-
WHITE
= 37¶
-
YELLOW
= 33¶
-
colorama.ansitowin32 module¶
-
class
colorama.ansitowin32.
AnsiToWin32
(wrapped, convert=None, strip=None, autoreset=False)[source]¶ Bases :
object
Implements a “write()” method which, on Windows, will strip ANSI character sequences from the text, and if outputting to a tty, will convert them into win32 function calls.
-
ANSI_CSI_RE
= re.compile('\x01?\x1b\\[((?:\\d|;)*)([a-zA-Z])\x02?')¶
-
ANSI_OSC_RE
= re.compile('\x01?\x1b\\]([^\x07]*)(\x07)\x02?')¶
-
should_wrap
()[source]¶ True if this class is actually needed. If false, then the output stream will not be affected, nor will win32 calls be issued, so wrapping stdout is not actually required. This will generally be False on non-Windows platforms, unless optional functionality like autoreset has been requested using kwargs to init()
-
colorama.initialise module¶
colorama.win32 module¶
colorama.winterm module¶
-
class
colorama.winterm.
WinColor
[source]¶ Bases :
object
-
BLACK
= 0¶
-
BLUE
= 1¶
-
CYAN
= 3¶
-
GREEN
= 2¶
-
GREY
= 7¶
-
MAGENTA
= 5¶
-
RED
= 4¶
-
YELLOW
= 6¶
-
-
class
colorama.winterm.
WinStyle
[source]¶ Bases :
object
-
BRIGHT
= 8¶
-
BRIGHT_BACKGROUND
= 128¶
-
NORMAL
= 0¶
-