Go to the latest version of this document.
search in docstrings

Search bar offers the following options:

- Term presence. The below example searches for documents that must contain “foo”, might contain “bar” and must not contain “baz”: `+foo bar -baz`
- Wildcards. The below example searches for documents with words beginning with “foo”: `foo*`
- Search in specific fields. The following search matches all objects in "twisted.mail" that matches “search”: `+qname:twisted.mail.* +search`

  Possible fields: 'name', 'qname' (fully qualified name), 'docstring', and 'kind'. Last two fields are only applicable if "search in docstrings" is enabled.

- Fuzzy matches. The following search matches all documents that have a word within 1 edit distance of “foo”: `foo~1`

Results provided by Lunr.js

# ``twisted`.`trial`.`reporter`.`_AnsiColorizer``

class documentation

`class _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)`.

Class Method | `supported` | A class method that returns True if the current platform supports coloring terminal output using this method. Returns False otherwise.
Method | `__init__` | Undocumented
Method | `write` | Write the given text to the stream in the given color.
Instance Variable | `stream` | Undocumented
Class Variable | `_colors` | 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 __init__(self, stream): (source)

Undocumented

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

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

Parameters
text | Text to be written to the stream.
color | A string label for a color. e.g. 'red', 'white'.

stream = (source)

Undocumented

_colors = (source)

Undocumented