Pygments formatters.
Unknown Field: copyright | |
Copyright 2006-2021 by the Pygments team, see AUTHORS. | |
Unknown Field: license | |
BSD, see LICENSE for details. |
Module | _mapping |
pygments.formatters._mapping ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
Module | bbcode |
pygments.formatters.bbcode ~~~~~~~~~~~~~~~~~~~~~~~~~~ |
Module | groff |
pygments.formatters.groff ~~~~~~~~~~~~~~~~~~~~~~~~~ |
Module | html |
pygments.formatters.html ~~~~~~~~~~~~~~~~~~~~~~~~ |
Module | img |
pygments.formatters.img ~~~~~~~~~~~~~~~~~~~~~~~ |
Module | irc |
pygments.formatters.irc ~~~~~~~~~~~~~~~~~~~~~~~ |
Module | latex |
pygments.formatters.latex ~~~~~~~~~~~~~~~~~~~~~~~~~ |
Module | other |
pygments.formatters.other ~~~~~~~~~~~~~~~~~~~~~~~~~ |
Module | pangomarkup |
pygments.formatters.pangomarkup ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
Module | rtf |
pygments.formatters.rtf ~~~~~~~~~~~~~~~~~~~~~~~ |
Module | svg |
pygments.formatters.svg ~~~~~~~~~~~~~~~~~~~~~~~ |
Module | terminal |
pygments.formatters.terminal ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
Module | terminal256 |
pygments.formatters.terminal256 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
From __init__.py
:
Function | get_formatter_by_name |
Lookup and instantiate a formatter by alias. |
Function | get_formatter_for_filename |
Lookup and instantiate a formatter by filename pattern. |
Function | load_formatter_from_file |
Load a formatter from a file. |
Variable | newmod |
Undocumented |
Variable | oldmod |
Undocumented |
Class | _automodule |
Automatically import formatters. |
Function | _fn_matches |
Return whether the supplied file name fn matches pattern filename. |
Function | _load_formatters |
Load a formatter (and all others in the module too). |
Function | find_formatter_class |
Lookup a formatter by alias. |
Function | get_all_formatters |
Return a generator for all formatter classes. |
Variable | _formatter_cache |
Undocumented |
Variable | _pattern_cache |
Undocumented |
Lookup and instantiate a formatter by alias.
Raises ClassNotFound if not found.
Load a formatter from a file.
This method expects a file located relative to the current working directory, which contains a class named CustomFormatter. By default, it expects the Formatter to be named CustomFormatter; you can specify your own class name as the second argument to this function.
Users should be very careful with the input, because this method is equivalent to running eval on the input file.
Raises ClassNotFound if there are any problems importing the Formatter.