Name Description Size
__init__.py Pygments ~~~~~~~~ Pygments is a syntax highlighting package written in Python. It is a generic syntax highlighter for general use in all kinds of software such as forum systems, wikis or other applications that need to prettify source code. Highlights are: * a wide range of common languages and markup formats is supported * special attention is paid to details, increasing quality by a fair amount * support for new languages and formats are added easily * a number of output formats, presently HTML, LaTeX, RTF, SVG, all image formats that PIL supports, and ANSI sequences * it is usable as a command-line tool and as a library * ... and it highlights even Brainfuck! The `Pygments master branch`_ is installable with ``easy_install Pygments==dev``. .. _Pygments master branch: https://github.com/pygments/pygments/archive/master.zip#egg=Pygments-dev :copyright: Copyright 2006-2025 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. 2959
__main__.py pygments.__main__ ~~~~~~~~~~~~~~~~~ Main entry point for ``python -m pygments``. :copyright: Copyright 2006-2025 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. 348
cmdline.py pygments.cmdline ~~~~~~~~~~~~~~~~ Command line interface. :copyright: Copyright 2006-2025 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. 23536
console.py pygments.console ~~~~~~~~~~~~~~~~ Format colored console output. :copyright: Copyright 2006-2025 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. 1718
filter.py pygments.filter ~~~~~~~~~~~~~~~ Module that implements the default filter. :copyright: Copyright 2006-2025 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. 1910
filters
formatter.py pygments.formatter ~~~~~~~~~~~~~~~~~~ Base formatter class. :copyright: Copyright 2006-2025 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. 4366
formatters
lexer.py pygments.lexer ~~~~~~~~~~~~~~ Base lexer classes. :copyright: Copyright 2006-2025 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. 35109
lexers
modeline.py (?: vi | vim | ex ) (?: [<=>]? \d* )? : .* (?: ft | filetype | syn | syntax ) = ( [^:\s]+ ) 1005
plugin.py pygments.plugin ~~~~~~~~~~~~~~~ Pygments plugin interface. lexer plugins:: [pygments.lexers] yourlexer = yourmodule:YourLexer formatter plugins:: [pygments.formatters] yourformatter = yourformatter:YourFormatter /.ext = yourformatter:YourFormatter As you can see, you can define extensions for the formatter with a leading slash. syntax plugins:: [pygments.styles] yourstyle = yourstyle:YourStyle filter plugin:: [pygments.filter] yourfilter = yourfilter:YourFilter :copyright: Copyright 2006-2025 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. 1891
regexopt.py pygments.regexopt ~~~~~~~~~~~~~~~~~ An algorithm that generates optimized regexes for matching long lists of literal strings. :copyright: Copyright 2006-2025 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. 3072
scanner.py pygments.scanner ~~~~~~~~~~~~~~~~ This library implements a regex based scanner. Some languages like Pascal are easy to parse but have some keywords that depend on the context. Because of this it's impossible to lex that just by using a regular expression lexer like the `RegexLexer`. Have a look at the `DelphiLexer` to get an idea of how to use this scanner. :copyright: Copyright 2006-2025 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. 3092
sphinxext.py .. module:: %s %s %s 7898
style.py pygments.style ~~~~~~~~~~~~~~ Basic style object. :copyright: Copyright 2006-2025 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. 6408
styles
token.py pygments.token ~~~~~~~~~~~~~~ Basic token types and the standard tokens. :copyright: Copyright 2006-2025 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. 6226
unistring.py pygments.unistring ~~~~~~~~~~~~~~~~~~ Strings of all Unicode characters of a certain category. Used for matching in Unicode-aware languages. Run to regenerate. Inspired by chartypes_create.py from the MoinMoin project. :copyright: Copyright 2006-2025 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. 63208
util.py <!DOCTYPE\s+( [a-zA-Z_][a-zA-Z0-9]* (?: \s+ # optional in HTML5 [a-zA-Z_][a-zA-Z0-9]*\s+ "[^"]*")? ) [^>]*> 10031