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

Class TerminalController

source code

A class that can be used to portably generate formatted output to a terminal. See http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/475116 for documentation. (This is a somewhat stripped-down version.)

Instance Methods [hide private]
 
__init__(self, term_stream=sys.stdout) source code
 
_tigetstr(self, cap_name) 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_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)
  WHITE = ''
  YELLOW = ''
  MAGENTA = ''
  RED = ''
  CYAN = ''
  GREEN = ''
  BLUE = ''
  BLACK = ''
  _STRING_CAPABILITIES = ['BOL=cr', 'UP=cuu1', 'DOWN=cud1', 'LEF...
  _COLORS = ['BLACK', 'BLUE', 'GREEN', 'CYAN', 'RED', 'MAGENTA',...
  _ANSICOLORS = ['BLACK', 'RED', 'GREEN', 'YELLOW', 'BLUE', 'MAG...
  FORCE_SIMPLE_TERM = True
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]

_STRING_CAPABILITIES

Value:
['BOL=cr',
 'UP=cuu1',
 'DOWN=cud1',
 'LEFT=cub1',
 'RIGHT=cuf1',
 'CLEAR_EOL=el',
 'BOLD=bold',
 'UNDERLINE=smul',
...

_COLORS

Value:
['BLACK',
 'BLUE',
 'GREEN',
 'CYAN',
 'RED',
 'MAGENTA',
 'YELLOW',
 'WHITE']

_ANSICOLORS

Value:
['BLACK',
 'RED',
 'GREEN',
 'YELLOW',
 'BLUE',
 'MAGENTA',
 'CYAN',
 'WHITE']