package documentation

pygments.formatters ~~~~~~~~~~~~~~~~~~~ Pygments formatters. :copyright: Copyright 2006-2022 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details.

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 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Module _mapping Undocumented

From __init__.py:

Function find_formatter_class Lookup a formatter by alias.
Function get_all_formatters Return a generator for all formatter classes.
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 _load_formatters Load a formatter (and all others in the module too).
Variable _formatter_cache Undocumented
_formatter_cache: dict = (source)

Undocumented

def _load_formatters(module_name): (source)

Load a formatter (and all others in the module too).

def get_all_formatters(): (source)

Return a generator for all formatter classes.

def find_formatter_class(alias): (source)

Lookup a formatter by alias. Returns None if not found.

def get_formatter_by_name(_alias, **options): (source)

Lookup and instantiate a formatter by alias. Raises ClassNotFound if not found.

def load_formatter_from_file(filename, formattername='CustomFormatter', **options): (source)

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. .. versionadded:: 2.2

def get_formatter_for_filename(fn, **options): (source)

Lookup and instantiate a formatter by filename pattern. Raises ClassNotFound if not found.

Undocumented

Undocumented