class documentation
Format tokens with groff escapes to change their color and font style. .. versionadded:: 2.11 Additional options accepted: `style` The style to use, can be a string or a Style subclass (default: ``'default'``). `monospaced` If set to true, monospace font will be used (default: ``true``). `linenos` If set to true, print the line numbers (default: ``false``). `wrap` Wrap lines to the specified number of characters. Disabled if set to 0 (default: ``0``).
Method | __init__ |
Undocumented |
Method | format |
Undocumented |
Class Variable | aliases |
Undocumented |
Class Variable | filenames |
Undocumented |
Class Variable | name |
Undocumented |
Instance Variable | linenos |
Undocumented |
Instance Variable | monospaced |
Undocumented |
Instance Variable | styles |
Undocumented |
Instance Variable | wrap |
Undocumented |
Method | _define |
Undocumented |
Method | _escape |
Undocumented |
Method | _make |
Undocumented |
Method | _wrap |
Undocumented |
Method | _write |
Undocumented |
Instance Variable | _linelen |
Undocumented |
Instance Variable | _lineno |
Undocumented |
Inherited from Formatter
:
Method | format |
Format ``tokensource``, an iterable of ``(tokentype, tokenstring)`` tuples and write it into ``outfile``. |
Method | get |
Return the style definitions for the current style as a string. |
Class Variable | unicodeoutput |
Undocumented |
Instance Variable | encoding |
Undocumented |
Instance Variable | full |
Undocumented |
Instance Variable | options |
Undocumented |
Instance Variable | style |
Undocumented |
Instance Variable | title |
Undocumented |