10 source code. Highlights are: |
10 source code. Highlights are: |
11 |
11 |
12 * a wide range of common languages and markup formats is supported |
12 * a wide range of common languages and markup formats is supported |
13 * special attention is paid to details, increasing quality by a fair amount |
13 * special attention is paid to details, increasing quality by a fair amount |
14 * support for new languages and formats are added easily |
14 * support for new languages and formats are added easily |
15 * a number of output formats, presently HTML, LaTeX, RTF, SVG and ANSI sequences |
15 * a number of output formats, presently HTML, LaTeX, RTF, SVG, all image |
|
16 formats that PIL supports, and ANSI sequences |
16 * it is usable as a command-line tool and as a library |
17 * it is usable as a command-line tool and as a library |
17 * ... and it highlights even Brainfuck! |
18 * ... and it highlights even Brainfuck! |
18 |
19 |
19 The `Pygments tip`_ is installable with ``easy_install Pygments==dev``. |
20 The `Pygments tip`_ is installable with ``easy_install Pygments==dev``. |
20 |
21 |
21 .. _Pygments tip: |
22 .. _Pygments tip: |
22 http://dev.pocoo.org/hg/pygments-main/archive/tip.tar.gz#egg=Pygments-dev |
23 http://dev.pocoo.org/hg/pygments-main/archive/tip.tar.gz#egg=Pygments-dev |
23 |
24 |
24 :copyright: Copyright 2006-2009 by the Pygments team, see AUTHORS. |
25 :copyright: Copyright 2006-2010 by the Pygments team, see AUTHORS. |
25 :license: BSD, see LICENSE for details. |
26 :license: BSD, see LICENSE for details. |
26 """ |
27 """ |
27 |
28 |
28 __version__ = '1.1.1' |
29 __version__ = '1.3.1' |
29 __docformat__ = 'restructuredtext' |
30 __docformat__ = 'restructuredtext' |
30 |
31 |
31 __all__ = ['lex', 'format', 'highlight'] |
32 __all__ = ['lex', 'format', 'highlight'] |
32 |
33 |
33 |
34 |
34 import sys, os |
35 import sys |
35 |
36 |
36 from pygments.util import StringIO, BytesIO |
37 from pygments.util import StringIO, BytesIO |
37 |
38 |
38 |
39 |
39 def lex(code, lexer): |
40 def lex(code, lexer): |