t.w.p.i._CharacterAttributes(_textattributes.CharacterAttributesMixin) : class documentation

Part of twisted.words.protocols.irc View 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:

Available colors are:

  1. white
  2. black
  3. blue
  4. green
  5. light red
  6. red
  7. magenta
  8. orange
  9. yellow
  10. light green
  11. cyan
  12. light cyan
  13. light blue
  14. light magenta
  15. gray
  16. light gray
Present Since13.1
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.

Inherited from CharacterAttributesMixin:

Method __getattr__ Undocumented
fg =
Foreground colors accessed by attribute name, see above for possible names.
bg =
Background colors accessed by attribute name, see above for possible names.
API Documentation for Twisted, generated by pydoctor at 2013-11-18 18:11:01.