Package winappdbg :: Module textio :: Class Color
[hide private]
[frames] | no frames]

Class Color

source code


Colored console output.

Instance Methods [hide private]

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __init__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Class Methods [hide private]
bool
can_use_colors(cls)
Determine if we can use colors.
source code
 
reset(cls)
Reset the colors to the default values.
source code
 
default(cls)
Make the current foreground color the default.
source code
 
light(cls)
Make the current foreground color light.
source code
 
dark(cls)
Make the current foreground color dark.
source code
 
black(cls)
Make the text foreground color black.
source code
 
white(cls)
Make the text foreground color white.
source code
 
red(cls)
Make the text foreground color red.
source code
 
green(cls)
Make the text foreground color green.
source code
 
blue(cls)
Make the text foreground color blue.
source code
 
cyan(cls)
Make the text foreground color cyan.
source code
 
magenta(cls)
Make the text foreground color magenta.
source code
 
yellow(cls)
Make the text foreground color yellow.
source code
 
bk_default(cls)
Make the current background color the default.
source code
 
bk_light(cls)
Make the current background color light.
source code
 
bk_dark(cls)
Make the current background color dark.
source code
 
bk_black(cls)
Make the text background color black.
source code
 
bk_white(cls)
Make the text background color white.
source code
 
bk_red(cls)
Make the text background color red.
source code
 
bk_green(cls)
Make the text background color green.
source code
 
bk_blue(cls)
Make the text background color blue.
source code
 
bk_cyan(cls)
Make the text background color cyan.
source code
 
bk_magenta(cls)
Make the text background color magenta.
source code
 
bk_yellow(cls)
Make the text background color yellow.
source code
Static Methods [hide private]
 
_get_text_attributes() source code
 
_set_text_attributes(wAttributes) source code
Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

can_use_colors(cls)
Class Method

source code 

Determine if we can use colors.

Colored output only works when the output is a real console, and fails when redirected to a file or pipe. Call this method before issuing a call to any other method of this class to make sure it's actually possible to use colors.

Returns: bool
True if it's possible to output text with color, False otherwise.