Ņō
fŊJc @ s^ d Z d d k Z d d k l Z d d k l Z d g Z d Z d e f d YZ d S( sū
pygments.formatter
~~~~~~~~~~~~~~~~~~
Base formatter class.
:copyright: Copyright 2006-2009 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.
iĸĸĸĸN( t get_bool_opt( t get_style_by_namet Formatterc C s t | t o t | S| S( N( t
isinstancet
basestringR ( t style( ( s6 /usr/lib/python2.6/site-packages/pygments/formatter.pyt
_lookup_style s c B sD e Z d Z d Z g Z g Z e Z d Z d d Z
d Z RS( s
Converts a token stream to text.
Options accepted:
``style``
The style to use, can be a string or a Style subclass
(default: "default"). Not used by e.g. the
TerminalFormatter.
``full``
Tells the formatter to output a "full" document, i.e.
a complete self-contained document. This doesn't have
any effect for some formatters (default: false).
``title``
If ``full`` is true, the title that should be used to
caption the document (default: '').
``encoding``
If given, must be an encoding name. This will be used to
convert the Unicode token strings to byte strings in the
output. If it is "" or None, Unicode strings will be written
to the output file, which most file-like objects do not
support (default: None).
``outencoding``
Overrides ``encoding`` if given.
c K s t | i d d | _ t | d t | _ | i d d | _ | i d d p d | _ | i d d p | i | _ | | _ d S( NR t defaultt fullt titlet t encodingt outencoding(
R t getR R t FalseR R t NoneR t options( t selfR ( ( s6 /usr/lib/python2.6/site-packages/pygments/formatter.pyt __init__B s R
c C s d S( s
Return the style definitions for the current style as a string.
``arg`` is an additional argument whose meaning depends on the
formatter used. Note that ``arg`` can also be a list or tuple
for some formatters like the html formatter.
R
( ( R t arg( ( s6 /usr/lib/python2.6/site-packages/pygments/formatter.pyt get_style_defsJ s c C s: | i o t i | i d | } n | i | | S( s
Format ``tokensource``, an iterable of ``(tokentype, tokenstring)``
tuples and write it into ``outfile``.
i ( R t codecst lookupt format_unencoded( R t tokensourcet outfile( ( s6 /usr/lib/python2.6/site-packages/pygments/formatter.pyt formatT s
N( t __name__t
__module__t __doc__R t namet aliasest filenamest Truet
unicodeoutputR R R ( ( ( s6 /usr/lib/python2.6/site-packages/pygments/formatter.pyR s
(
R R t
pygments.utilR t pygments.stylesR t __all__R t objectR ( ( ( s6 /usr/lib/python2.6/site-packages/pygments/formatter.pyt