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`.`conch`.`ui`.`ansi`.`AnsiParser``

class documentation

`class AnsiParser: (source)`

View In Hierarchy

Parser class for ANSI codes.

Method | `__init__` | Undocumented
Method | `formatText` | Undocumented
Method | `parseColor` | Handle a single ANSI color sequence
Method | `parseCursor` | Undocumented
Method | `parseErase` | Undocumented
Method | `parseString` | Turn a string input into a list of `ColorText` elements.
Method | `pickColor` | Undocumented
Method | `stripEscapes` | Remove all ANSI color escapes from the given string.
Method | `writeString` | Undocumented
Constant | `ASSIGN_SET` | Undocumented
Constant | `COLOR_SET` | Undocumented
Constant | `CURSOR_SET` | Undocumented
Constant | `ERASE_SET` | Undocumented
Constant | `MODE_SET` | Undocumented
Constant | `SETS` | Undocumented
Instance Variable | `bold` | Undocumented
Instance Variable | `currentBG` | Undocumented
Instance Variable | `currentFG` | Undocumented
Instance Variable | `defaultBG` | Undocumented
Instance Variable | `defaultFG` | Undocumented
Instance Variable | `display` | Undocumented
Instance Variable | `flash` | Undocumented
Instance Variable | `prepend` | Undocumented
Instance Variable | `reverse` | Undocumented
Instance Variable | `underline` | Undocumented

def __init__(self, defaultFG, defaultBG): (source)

Undocumented

def formatText(self, text): (source)

Undocumented

def parseColor(self, str): (source)

Handle a single ANSI color sequence

def parseCursor(self, cursor): (source)

Undocumented

def parseErase(self, erase): (source)

Undocumented

def parseString(self, str): (source)

Turn a string input into a list of `ColorText` elements.

def pickColor(self, value, mode, BOLD=ColorText.BOLD_COLORS): (source)

Undocumented

def stripEscapes(self, string): (source)

Remove all ANSI color escapes from the given string.

def writeString(self, colorstr): (source)

Undocumented

ASSIGN_SET: `tuple[str, ...]` = (source)

Undocumented

Value

    ('p')

COLOR_SET: `tuple[str, ...]` = (source)

Undocumented

Value

    ('m')

CURSOR_SET: `tuple[str, ...]` = (source)

Undocumented

Value

    ('H', 'f', 'A', 'B', 'C', 'D', 'R', 's', 'u', 'd', 'G')

ERASE_SET: `tuple[str, ...]` = (source)

Undocumented

Value

    ('J', 'K', 'P')

MODE_SET: `tuple[str, ...]` = (source)

Undocumented

Value

    ('h', 'l')

SETS = (source)

Undocumented

Value

    (CURSOR_SET, ERASE_SET, MODE_SET, ASSIGN_SET, COLOR_SET)

bold = (source)

Undocumented

currentBG = (source)

Undocumented

currentFG = (source)

Undocumented

defaultBG = (source)

Undocumented

defaultFG = (source)

Undocumented

display: `int` = (source)

Undocumented

flash = (source)

Undocumented

prepend: `str` = (source)

Undocumented

reverse = (source)

Undocumented

underline = (source)

Undocumented