ó Y-Qc@s^dZddlZddlmZddlmZdgZd„Zdefd„ƒYZ dS(sū pygments.formatter ~~~~~~~~~~~~~~~~~~ Base formatter class. :copyright: Copyright 2006-2013 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. iĸĸĸĸN(t get_bool_opt(tget_style_by_namet FormattercCst|tƒrt|ƒS|S(N(t isinstancet basestringR(tstyle((s</usr/local/lib/python2.7/site-packages/pygments/formatter.pyt _lookup_styles cBsDeZdZdZgZgZeZd„Z dd„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. cKs‹t|jddƒƒ|_t|dtƒ|_|jddƒ|_|jddƒpZd|_|jddƒpx|j|_||_ dS(NRtdefaulttfullttitlettencodingt outencoding( RtgetRRtFalseRR tNoneR toptions(tselfR((s</usr/local/lib/python2.7/site-packages/pygments/formatter.pyt__init__Bs R cCsdS(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 ((Rtarg((s</usr/local/lib/python2.7/site-packages/pygments/formatter.pytget_style_defsJscCs8|jr(tj|jƒd|ƒ}n|j||ƒS(sƒ Format ``tokensource``, an iterable of ``(tokentype, tokenstring)`` tuples and write it into ``outfile``. i(R tcodecstlookuptformat_unencoded(Rt tokensourcetoutfile((s</usr/local/lib/python2.7/site-packages/pygments/formatter.pytformatTs N( t__name__t __module__t__doc__Rtnametaliasest filenamestTruet unicodeoutputRRR(((s</usr/local/lib/python2.7/site-packages/pygments/formatter.pyRs  ( RRt pygments.utilRtpygments.stylesRt__all__RtobjectR(((s</usr/local/lib/python2.7/site-packages/pygments/formatter.pyt s