console_output Module

module to return all streams from the managed processes to the console. This application is subscribing to the manager to know when a process is created or killed and display the information. When an OS process is spawned it then subscribe to its streams if any are redirected and print the output on the console. This module is used by Gaffer .

Note

if colorize is set to true, each templates will have a different colour

class gaffer.console_output.Color[source]

Bases: object

wrapper around colorama to ease the output creation. Don’t use it directly, instead, use the colored(name_of_color, lines) to return the colored ouput.

Colors are: cyan, yellow, green, magenta, red, blue, intense_cyan, intense_yellow, intense_green, intense_magenta, intense_red, intense_blue.

lines can be a list or a string.

output(color_name, lines)[source]
class gaffer.console_output.ConsoleOutput(colorize=True, output_streams=True, actions=None)[source]

Bases: object

The application that need to be added to the gaffer manager

DEFAULT_ACTIONS = ['start', 'stop', 'spawn', 'reap', 'exit', 'stop_pid']
restart()[source]
start(loop, manager)[source]
stop()[source]
gaffer.console_output.status_bar(s)[source]