utils.term

Terminals and colors.

Module Contents

Classes

colored(self,*s,**kwargs) Terminal colored text.

Functions

fg(s)
supports_images()
_read_as_base64(path)
imgcat(path,inline=1,preserve_aspect_ratio=0,**kwargs)
fg(s)
class colored(*s, **kwargs)

Terminal colored text.

Example:
>>> c = colored(enabled=True)
>>> print(str(c.red('the quick '), c.blue('brown ', c.bold('fox ')),
...       c.magenta(c.underline('jumps over')),
...       c.yellow(' the lazy '),
...       c.green('dog ')))
__init__(*s, **kwargs)
_add(a, b)
_fold_no_color(a, b)
no_color()
embed()
__str__()
node(s, op)
black(*s)
red(*s)
green(*s)
yellow(*s)
blue(*s)
magenta(*s)
cyan(*s)
white(*s)
__repr__()
bold(*s)
underline(*s)
reverse(*s)
bright(*s)
ired(*s)
igreen(*s)
iyellow(*s)
iblue(*s)
imagenta(*s)
icyan(*s)
iwhite(*s)
reset(*s)
__add__(other)
supports_images()
_read_as_base64(path)
imgcat(path, inline=1, preserve_aspect_ratio=0, **kwargs)