Package epydoc :: Module util :: Class TerminalController
[hide private]
[frames] | no frames]

ClassType TerminalController

source code

A class that can be used to portably generate formatted output to a terminal. See for documentation. (This is a somewhat stripped-down version.)

Instance Methods [hide private]
__init__(self, term_stream=sys.stdout) source code
call graph 
_tigetstr(self, cap_name) source code
call graph 
render(self, template)
Replace each $-substitutions in the given template string with the corresponding terminal control string (if it's defined) or '' (if it's not).
source code
_render_sub(self, match) source code
Class Variables [hide private]
  BOL = ''
Move the cursor to the beginning of the line
  UP = ''
Move the cursor up one line
  DOWN = ''
Move the cursor down one line
  LEFT = ''
Move the cursor left one char
  RIGHT = ''
Move the cursor right one char
  CLEAR_EOL = ''
Clear to the end of the line.
Clear the current line; cursor to BOL.
  BOLD = ''
Turn on bold mode
  NORMAL = ''
Turn off all modes
  COLS = 75
Width of the terminal (default to 75)
Underline the text
  REVERSE = ''
Reverse the foreground & background
  WHITE = ''
  YELLOW = ''
  MAGENTA = ''
  RED = ''
  CYAN = ''
  GREEN = ''
  BLUE = ''
  BLACK = ''
  _STRING_CAPABILITIES = ['BOL=cr', 'UP=cuu1', 'DOWN=cud1', 'LEF...
If this is set to true, then new TerminalControllers will assume that the terminal is not capable of doing manipulation of any kind.
Class Variable Details [hide private]