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`.`insults`.`text`.`_CharacterAttributes``

class documentation

`class _CharacterAttributes(_textattributes.CharacterAttributesMixin): (source)`

View In Hierarchy

Factory for character attributes, including foreground and background color and non-color attributes such as bold, reverse video and underline.

Character attributes are applied to actual text by using object indexing-syntax (`obj['abc']`) after accessing a factory attribute, for example:

        attributes.bold['Some text']

These can be nested to mix attributes:

        attributes.bold[attributes.underline['Some text']]

And multiple values can be passed:

        attributes.normal[attributes.bold['Some'], ' text']

Non-color attributes can be accessed by attribute name, available attributes are:

- bold
- blink
- reverseVideo
- underline

Available colors are:

1. black
2. red
3. green
4. yellow
5. blue
6. magenta
7. cyan
8. white

Class Variable | `attrs` | Undocumented
Instance Variable | `bg` | Background colors accessed by attribute name, see above for possible names.
Instance Variable | `fg` | Foreground colors accessed by attribute name, see above for possible names.

Inherited from `CharacterAttributesMixin`:

Method | `__getattr__` | Undocumented

attrs = (source)

Undocumented

bg = (source)

Background colors accessed by attribute name, see above for possible names.

fg = (source)

Foreground colors accessed by attribute name, see above for possible names.