PyFoam.Basics.TerminalFormatter module¶
Formats the output on a terminal
-
class
PyFoam.Basics.TerminalFormatter.TerminalFormatter[source]¶ Bases:
objectClass that contains the formating codes for the terminal
-
__dict__= dict_proxy({'reset': '\x1b(B\x1b[m', '__module__': 'PyFoam.Basics.TerminalFormatter', 'bold': '\x1b[1m', 'green': '\x1b[32m', 'yellow': '\x1b[36m', 'back_yellow': '\x1b[46m', 'back_cyan': '\x1b[43m', 'back_white': '\x1b[47m', 'back_green': '\x1b[42m', '__dict__': <attribute '__dict__' of 'TerminalFormatter' objects>, 'cyan': '\x1b[33m', 'magenta': '\x1b[35m', '__weakref__': <attribute '__weakref__' of 'TerminalFormatter' objects>, 'addFormat': <function addFormat>, 'blue': '\x1b[34m', 'standout': '\x1b[7m', 'back_magenta': '\x1b[45m', 'back_black': '\x1b[40m', 'back_red': '\x1b[41m', 'buildSequence': <function buildSequence>, 'black': '\x1b[30m', 'under': '\x1b[4m', 'back_blue': '\x1b[44m', 'white': '\x1b[37m', 'getConfigFormat': <function getConfigFormat>, '__doc__': 'Class that contains the formating codes for the terminal', 'red': '\x1b[31m'})¶
-
__module__= 'PyFoam.Basics.TerminalFormatter'¶
-
__weakref__¶ list of weak references to the object (if defined)
-
addFormat(name, specification)[source]¶ Add a new format to the object :param name: Name under which the format is added to the formatter :param specification: The specification string for the format
-
back_black= '\x1b[40m'¶
-
back_blue= '\x1b[44m'¶
-
back_cyan= '\x1b[43m'¶
-
back_green= '\x1b[42m'¶
-
back_magenta= '\x1b[45m'¶
-
back_red= '\x1b[41m'¶
-
back_white= '\x1b[47m'¶
-
back_yellow= '\x1b[46m'¶
-
black= '\x1b[30m'¶
-
blue= '\x1b[34m'¶
-
bold= '\x1b[1m'¶
-
buildSequence(specification)[source]¶ Build an escape sequence from a specification string :param specification: the specification string that is a number of komma-separated words. The words specify the color and the formatting
-
cyan= '\x1b[33m'¶
-
getConfigFormat(name, shortName=None)[source]¶ Gets a format sequence from the global configuration and adds it to the formatter object :param name: Name under which this is found in the ‘Formats’-section of the configuration :param shortName: Short name under which this is stored in the foratter. If none is given the regular name is used
-
green= '\x1b[32m'¶
-
magenta= '\x1b[35m'¶
-
red= '\x1b[31m'¶
-
reset= '\x1b(B\x1b[m'¶
-
standout= '\x1b[7m'¶
-
under= '\x1b[4m'¶
-
white= '\x1b[37m'¶
-
yellow= '\x1b[36m'¶
-