class documentation

class GroffFormatter(Formatter):

View In Hierarchy

Format tokens with groff escapes to change their color and font style.

New in version 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 ​_define​_colors Undocumented
Method ​_escape​_chars Undocumented
Method ​_make​_styles Undocumented
Method ​_wrap​_line Undocumented
Method ​_write​_lineno Undocumented
Method format​_unencoded Undocumented
Class Variable aliases Undocumented
Class Variable filenames Undocumented
Class Variable name Undocumented
Instance Variable ​_linelen Undocumented
Instance Variable ​_lineno Undocumented
Instance Variable linenos Undocumented
Instance Variable monospaced Undocumented
Instance Variable styles Undocumented
Instance Variable wrap Undocumented

Inherited from Formatter:

Method format Format tokensource, an iterable of (tokentype, tokenstring) tuples and write it into outfile.
Method get​_style​_defs 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
def __init__(self, **options):

Undocumented

def _define_colors(self, outfile):

Undocumented

def _escape_chars(self, text):

Undocumented

def _make_styles(self):

Undocumented

def _wrap_line(self, line):

Undocumented

def _write_lineno(self, outfile):

Undocumented

def format_unencoded(self, tokensource, outfile):

Undocumented

aliases: list[str] =

Undocumented

filenames: list =
name: str =

Undocumented

_linelen: int =

Undocumented

_lineno: int =

Undocumented

linenos =

Undocumented

monospaced =

Undocumented

styles: dict =

Undocumented

wrap =

Undocumented