class documentation

class twisted.trial.reporter._AnsiColorizer: (source)

View In Hierarchy

A colorizer is an object that loosely wraps around a stream, allowing callers to write text to the stream in a particular color.

Colorizer classes must implement supported() and write(text, color).

Method __init__ Undocumented
Instance Variable stream Undocumented
Class Method supported A class method that returns True if the current platform supports coloring terminal output using this method. Returns False otherwise.
Method write Write the given text to the stream in the given color.
Class Variable _colors Undocumented
_colors = (source)

Undocumented

def __init__(self, stream): (source)

Undocumented

stream = (source)

Undocumented

@classmethod
def supported(cls, stream=sys.stdout): (source)

A class method that returns True if the current platform supports coloring terminal output using this method. Returns False otherwise.

def write(self, text, color): (source)

Write the given text to the stream in the given color.

ParameterstextText to be written to the stream.
colorA string label for a color. e.g. 'red', 'white'.
API Documentation for Twisted, generated by pydoctor 20.12.1 at 2021-02-28 19:53:36.