pygments.formatters.other

Other formatters: NullFormatter, RawTokenFormatter.

copyright:Copyright 2006-2013 by the Pygments team, see AUTHORS.
license:BSD, see LICENSE for details.
class pygments.formatters.other.NullFormatter(**options)[source]

Output the text unchanged without any formatting.

class pygments.formatters.other.RawTokenFormatter(**options)[source]

Format tokens as a raw representation for storing token streams.

The format is tokentype<TAB>repr(tokenstring)\n. The output can later be converted to a token stream with the RawTokenLexer, described in the lexer list.

Only two options are accepted:

compress
If set to 'gz' or 'bz2', compress the output with the given compression algorithm after encoding (default: '').
error_color
If set to a color name, highlight error tokens using that color. If set but with no value, defaults to 'red'. New in Pygments 0.11.

Project Versions

This Page