Package daklib :: Module termcolor
[hide private]
[frames] | no frames]

Module termcolor

source code

TermColor utils for dak


Contact: Debian FTP Master <ftpmaster@debian.org>

Copyright: 2019 Mo Zhou <lumin@debian.org>

License: GNU General Public License version 2 or later

Functions [hide private]
 
colorize(s, fg, bg=None, bold=False, ul=False)
s: str -- string to be colorized fg: str/int -- foreground color.
source code
Variables [hide private]
  _COLORS_ = ('red', 'green', 'yellow', 'blue', 'violet', 'cyan'...
  _COLOR_CODES_ = {'blue': 34, 'cyan': 36, 'green': 32, 'red': 3...
  __package__ = None
Function Details [hide private]

colorize(s, fg, bg=None, bold=False, ul=False)

source code 

s: str -- string to be colorized fg: str/int -- foreground color. See _COLORS_ for choices bg: str/int -- background color. See _COLORS_ for choices bold: bool -- bold font? ul: bool -- underline?


Variables Details [hide private]

_COLORS_

Value:
('red', 'green', 'yellow', 'blue', 'violet', 'cyan', 'white')

_COLOR_CODES_

Value:
{'blue': 34,
 'cyan': 36,
 'green': 32,
 'red': 31,
 'violet': 35,
 'white': 37,
 'yellow': 33}