fluiddyn.util.terminal_colors

Terminal color codes (fluiddyn.util.terminal_colors)

Defines string variables useful to print in color in a terminal.

Provides:

class fluiddyn.util.terminal_colors.CPrint[source]

Bases: object

Print colored text

>>> cprint = CPrint()
>>> cprint("vorticity", color="RED")
>>> cprint.red("divergence")
header(*args, **kwargs)[source]
light_blue(*args, **kwargs)[source]
light_green(*args, **kwargs)[source]
light_gray(*args, **kwargs)[source]
warning(*args, **kwargs)[source]
fail(*args, **kwargs)[source]
black(*args, **kwargs)[source]
red(*args, **kwargs)[source]
green(*args, **kwargs)[source]
yellow(*args, **kwargs)[source]
blue(*args, **kwargs)[source]
magenta(*args, **kwargs)[source]
cyan(*args, **kwargs)[source]
white(*args, **kwargs)[source]

Functions

cstring(*args, **kwargs)

Return a colored string.

print_fail(*args, **kwargs)

Print in bold with "FAIL" font color.

print_warning(*args, **kwargs)

Print with "WARNING" font colour.

Classes

CPrint()

Print colored text