class documentation

class twisted.conch.insults.text._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
Instance Variable fg Foreground colors accessed by attribute name, see above for possible names.
Instance Variable bg Background colors accessed by attribute name, see above for possible names.
Class Variable attrs Undocumented

Inherited from CharacterAttributesMixin:

Method __getattr__ Undocumented
Foreground colors accessed by attribute name, see above for possible names.
Background colors accessed by attribute name, see above for possible names.
attrs = (source)

Undocumented

API Documentation for Twisted, generated by pydoctor 20.12.1 at 2021-02-28 19:53:36.