Package rekall :: Package ui :: Module text :: Class Colorizer
[frames] | no frames]

Class Colorizer

source code


An object which makes its target colorful.

Instance Methods
 
__init__(self, stream, color='auto', session=None)
Initialize a colorizer.
source code
 
tparm(self, capabilities, *args)
A simplified version of tigetstr without terminal delays.
source code
 
Render(self, target, foreground=None, background=None)
Decorate the string with the ansii escapes for the color.
source code

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

Class Variables
  COLORS = u'BLACK RED GREEN YELLOW BLUE MAGENTA CYAN WHITE'
  COLOR_MAP = {u'BLACK': 0, u'BLUE': 4, u'CYAN': 6, u'GREEN': 2,...
  terminal_capable = False
  i = 7
  x = u'WHITE'
Properties

Inherited from object: __class__

Method Details

__init__(self, stream, color='auto', session=None)
(Constructor)

source code 
Initialize a colorizer.

Args:
  stream: The stream to write to.

  color: If "no" we suppress using colors, even if the output stream
     can support them.

Overrides: object.__init__

Class Variable Details

COLOR_MAP

Value:
{u'BLACK': 0,
 u'BLUE': 4,
 u'CYAN': 6,
 u'GREEN': 2,
 u'MAGENTA': 5,
 u'RED': 1,
 u'WHITE': 7,
 u'YELLOW': 3}