libcopp  1.1.0
Public Member Functions | Static Public Attributes
print_color.Win32ConsoleColor Class Reference
Collaboration diagram for print_color.Win32ConsoleColor:
Collaboration graph

Public Member Functions

def get_cmd_color (self, handle=std_out_handle)
 
def set_cmd_color (self, color, handle=std_out_handle)
 
def stdout_with_color (self, options, text)
 
def stderr_with_color (self, options, text)
 

Static Public Attributes

string name = 'windows console'
 
int STD_INPUT_HANDLE = -10
 
int STD_OUTPUT_HANDLE = -11
 
int STD_ERROR_HANDLE = -12
 
int FOREGROUND_BLACK = 0x0
 
int FOREGROUND_BLUE = 0x01
 
int FOREGROUND_GREEN = 0x02
 
int FOREGROUND_RED = 0x04
 
int FOREGROUND_INTENSITY = 0x08
 
int BACKGROUND_BLUE = 0x10
 
int BACKGROUND_GREEN = 0x20
 
int BACKGROUND_RED = 0x40
 
int BACKGROUND_INTENSITY = 0x80
 
dictionary COLOR_MAP
 
 std_out_handle = None
 
 std_err_handle = None
 

Detailed Description

Definition at line 42 of file print_color.py.

Member Function Documentation

def print_color.Win32ConsoleColor.get_cmd_color (   self,
  handle = std_out_handle 
)
def print_color.Win32ConsoleColor.set_cmd_color (   self,
  color,
  handle = std_out_handle 
)
(color) -> bit
Example: set_cmd_color(FOREGROUND_RED | FOREGROUND_GREEN | FOREGROUND_BLUE | FOREGROUND_INTENSITY)

Definition at line 87 of file print_color.py.

Referenced by print_color.Win32ConsoleColor.stderr_with_color(), and print_color.Win32ConsoleColor.stdout_with_color().

def print_color.Win32ConsoleColor.stderr_with_color (   self,
  options,
  text 
)
def print_color.Win32ConsoleColor.stdout_with_color (   self,
  options,
  text 
)

Field Documentation

int print_color.Win32ConsoleColor.BACKGROUND_BLUE = 0x10
static

Definition at line 54 of file print_color.py.

int print_color.Win32ConsoleColor.BACKGROUND_GREEN = 0x20
static

Definition at line 55 of file print_color.py.

int print_color.Win32ConsoleColor.BACKGROUND_INTENSITY = 0x80
static

Definition at line 57 of file print_color.py.

int print_color.Win32ConsoleColor.BACKGROUND_RED = 0x40
static

Definition at line 56 of file print_color.py.

dictionary print_color.Win32ConsoleColor.COLOR_MAP
static
Initial value:
1 = {
2  print_style.FC_BLACK: FOREGROUND_BLACK,
3  print_style.FC_BLUE: FOREGROUND_BLUE | FOREGROUND_INTENSITY,
4  print_style.FC_GREEN: FOREGROUND_GREEN | FOREGROUND_INTENSITY,
5  print_style.FC_CYAN: FOREGROUND_GREEN | FOREGROUND_BLUE | FOREGROUND_INTENSITY,
6  print_style.FC_RED: FOREGROUND_RED | FOREGROUND_INTENSITY,
7  print_style.FC_MAGENTA: FOREGROUND_RED | FOREGROUND_BLUE | FOREGROUND_INTENSITY,
8  print_style.FC_YELLOW: FOREGROUND_RED | FOREGROUND_GREEN | FOREGROUND_INTENSITY,
9  print_style.FC_WHITE: FOREGROUND_BLUE | FOREGROUND_GREEN | FOREGROUND_RED,
10 
11  print_style.BC_BLACK: FOREGROUND_BLACK,
12  print_style.BC_BLUE: BACKGROUND_BLUE,
13  print_style.BC_GREEN: BACKGROUND_GREEN,
14  print_style.BC_CYAN: BACKGROUND_BLUE | BACKGROUND_GREEN,
15  print_style.BC_RED: BACKGROUND_RED,
16  print_style.BC_MAGENTA: BACKGROUND_RED | BACKGROUND_BLUE,
17  print_style.BC_YELLOW: BACKGROUND_RED | BACKGROUND_GREEN,
18  print_style.BC_WHITE: BACKGROUND_RED | BACKGROUND_GREEN | BACKGROUND_BLUE,
19 
20  print_style.FW_BOLD: BACKGROUND_INTENSITY
21  }

Definition at line 59 of file print_color.py.

int print_color.Win32ConsoleColor.FOREGROUND_BLACK = 0x0
static

Definition at line 48 of file print_color.py.

int print_color.Win32ConsoleColor.FOREGROUND_BLUE = 0x01
static

Definition at line 49 of file print_color.py.

int print_color.Win32ConsoleColor.FOREGROUND_GREEN = 0x02
static

Definition at line 50 of file print_color.py.

int print_color.Win32ConsoleColor.FOREGROUND_INTENSITY = 0x08
static

Definition at line 52 of file print_color.py.

int print_color.Win32ConsoleColor.FOREGROUND_RED = 0x04
static

Definition at line 51 of file print_color.py.

string print_color.Win32ConsoleColor.name = 'windows console'
static

Definition at line 43 of file print_color.py.

print_color.Win32ConsoleColor.std_err_handle = None
static

Definition at line 82 of file print_color.py.

Referenced by print_color.Win32ConsoleColor.stderr_with_color().

int print_color.Win32ConsoleColor.STD_ERROR_HANDLE = -12
static

Definition at line 46 of file print_color.py.

int print_color.Win32ConsoleColor.STD_INPUT_HANDLE = -10
static

Definition at line 44 of file print_color.py.

print_color.Win32ConsoleColor.std_out_handle = None
static

Definition at line 81 of file print_color.py.

Referenced by print_color.Win32ConsoleColor.stdout_with_color().

int print_color.Win32ConsoleColor.STD_OUTPUT_HANDLE = -11
static

Definition at line 45 of file print_color.py.


The documentation for this class was generated from the following file: