Package entropy :: Module output

Module output

source code

# DESCRIPTION: # Text formatting and colouring tools

Copyright 1998-2004 Gentoo Foundation # $Id: output.py 4906 2006-11-01 23:55:29Z zmedico $ Copyright (C) 2007-2008 Fabio Erculiani

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA

Classes
  TextInterface
Functions
 
setcols() source code
 
color(fg, bg='default', attr=['normal']) source code
 
xtermTitle(mystr, raw=False) source code
 
xtermTitleReset() source code
 
notitles()
turn off title setting
source code
 
nocolor()
turn off colorization
source code
 
resetColor() source code
 
colorize(color_key, text) source code
 
bold(text) source code
 
white(text) source code
 
teal(text) source code
 
turquoise(text) source code
 
darkteal(text) source code
 
fuscia(text) source code
 
fuchsia(text) source code
 
purple(text) source code
 
blue(text) source code
 
darkblue(text) source code
 
green(text) source code
 
darkgreen(text) source code
 
yellow(text) source code
 
brown(text) source code
 
darkyellow(text) source code
 
red(text) source code
 
darkred(text) source code
 
create_color_func(color_key) source code
 
enlightenatom(atom) source code
 
print_menu(data, args=None) source code
 
reset_cursor() source code
 
flush_stdouterr() source code
 
print_error(msg, back=False, flush=True) source code
 
print_info(msg, back=False, flush=True) source code
 
print_warning(msg, back=False, flush=True) source code
 
print_generic(msg) source code
 
writechar(char) source code
 
readtext(request, password=False) source code
 
my_raw_input(txt='') source code
Variables
  stuff = {'ESC': '\x1b', 'cleanline': ' ...
  havecolor = 1
  dotitles = 1
  esc_seq = '\x1b['
  g_attr = {'bg_black': 40, 'bg_blue': 44, 'bg_cyan': 46, 'bg_de...
  codes = {'0x000000': '\x1b[30m', '0x0000AA': '\x1b[34m', '0x00...
  ansi_color_codes = ['30m', '30;01m', '31m', '31;01m', '32m', '...
  rgb_ansi_colors = ['0x000000', '0x555555', '0xAA0000', '0xFF55...
  default_xterm_title = None
  nc = None
Variables Details

stuff

Value:
{'ESC': '\x1b',
 'cleanline': '                              ',
 'cols': 30,
 'cursor': False}

g_attr

Value:
{'bg_black': 40,
 'bg_blue': 44,
 'bg_cyan': 46,
 'bg_default': 49,
 'bg_green': 42,
 'bg_magenta': 45,
 'bg_red': 41,
 'bg_white': 47,
...

codes

Value:
{'0x000000': '\x1b[30m',
 '0x0000AA': '\x1b[34m',
 '0x00AA00': '\x1b[32m',
 '0x00AAAA': '\x1b[36m',
 '0x555555': '\x1b[30;01m',
 '0x5555FF': '\x1b[34;01m',
 '0x55FF55': '\x1b[32;01m',
 '0x55FFFF': '\x1b[36;01m',
...

ansi_color_codes

Value:
['30m',
 '30;01m',
 '31m',
 '31;01m',
 '32m',
 '32;01m',
 '33m',
 '33;01m',
...

rgb_ansi_colors

Value:
['0x000000',
 '0x555555',
 '0xAA0000',
 '0xFF5555',
 '0x00AA00',
 '0x55FF55',
 '0xAA5500',
 '0xFFFF55',
...