{
    "mode": "pydoc",
    "parameter": "pygments",
    "section": "",
    "url": "https://www.chedong.com/phpMan.php/pydoc/pygments/json",
    "generated": "2026-06-02T13:20:00Z",
    "sections": {
        "NAME": {
            "content": "pygments\n",
            "subsections": []
        },
        "DESCRIPTION": {
            "content": "Pygments\n~~~~~~~~\n\nPygments is a syntax highlighting package written in Python.\n\nIt is a generic syntax highlighter for general use in all kinds of software\nsuch as forum systems, wikis or other applications that need to prettify\nsource code. Highlights are:\n\n* a wide range of common languages and markup formats is supported\n* special attention is paid to details, increasing quality by a fair amount\n* support for new languages and formats are added easily\n* a number of output formats, presently HTML, LaTeX, RTF, SVG, all image\nformats that PIL supports, and ANSI sequences\n* it is usable as a command-line tool and as a library\n* ... and it highlights even Brainfuck!\n\nThe `Pygments master branch` is installable with ``easyinstall Pygments==dev``.\n\n.. Pygments master branch:\nhttps://github.com/pygments/pygments/archive/master.zip#egg=Pygments-dev\n\n:copyright: Copyright 2006-2021 by the Pygments team, see AUTHORS.\n:license: BSD, see LICENSE for details.\n",
            "subsections": []
        },
        "PACKAGE CONTENTS": {
            "content": "main\ncmdline\nconsole\nfilter\nfilters (package)\nformatter\nformatters (package)\nlexer\nlexers (package)\nmodeline\nplugin\nregexopt\nscanner\nsphinxext\nstyle\nstyles (package)\ntoken\nunistring\nutil\n",
            "subsections": []
        },
        "FUNCTIONS": {
            "content": "",
            "subsections": [
                {
                    "name": "format",
                    "content": "Format a tokenlist ``tokens`` with the formatter ``formatter``.\n\nIf ``outfile`` is given and a valid file object (an object\nwith a ``write`` method), the result will be written to it, otherwise\nit is returned as a string.\n"
                },
                {
                    "name": "highlight",
                    "content": "Lex ``code`` with ``lexer`` and format it with the formatter ``formatter``.\n\nIf ``outfile`` is given and a valid file object (an object\nwith a ``write`` method), the result will be written to it, otherwise\nit is returned as a string.\n"
                },
                {
                    "name": "lex",
                    "content": "Lex ``code`` with ``lexer`` and return an iterable of tokens.\n"
                }
            ]
        },
        "DATA": {
            "content": "all = ['lex', 'format', 'highlight']\ndocformat = 'restructuredtext'\n",
            "subsections": []
        },
        "VERSION": {
            "content": "2.11.2\n",
            "subsections": []
        },
        "FILE": {
            "content": "/usr/lib/python3/dist-packages/pygments/init.py\n\n",
            "subsections": []
        }
    },
    "summary": "pygments",
    "flags": [],
    "examples": [],
    "see_also": []
}