PKŽcŠ5Ïœ4m m pygments/style.py# -*- coding: utf-8 -*- """ pygments.style ~~~~~~~~~~~~~~ Basic style object. :copyright: 2006 by Georg Brandl. :license: BSD, see LICENSE for more details. """ from pygments.token import Token, STANDARD_TYPES class StyleMeta(type): def __new__(mcs, name, bases, dct): obj = type.__new__(mcs, name, bases, dct) for token in STANDARD_TYPES: if token not in obj.styles: obj.styles[token] = '' def colorformat(text): if text[0:1] == '#': col = text[1:] if len(col) == 6: return col elif len(col) == 3: return col[0]+'0'+col[1]+'0'+col[2]+'0' elif text == '': return '' assert False, "wrong color format %r" % text _styles = obj._styles = {} for ttype in obj.styles: for token in ttype.split(): if token in _styles: continue ndef = _styles.get(token.parent, None) styledefs = obj.styles.get(token, '').split() if not ndef or token is None: ndef = ['', 0, 0, 0, '', ''] elif 'noinherit' in styledefs and token is not Token: ndef = _styles[Token][:] else: ndef = ndef[:] _styles[token] = ndef for styledef in obj.styles.get(token, '').split(): if styledef == 'noinherit': pass elif styledef == 'bold': ndef[1] = 1 elif styledef == 'nobold': ndef[1] = 0 elif styledef == 'italic': ndef[2] = 1 elif styledef == 'noitalic': ndef[2] = 0 elif styledef == 'underline': ndef[3] = 1 elif styledef == 'nounderline': ndef[3] = 0 elif styledef[:3] == 'bg:': ndef[4] = colorformat(styledef[3:]) elif styledef[:7] == 'border:': ndef[5] = colorformat(styledef[7:]) else: ndef[0] = colorformat(styledef) return obj def style_for_token(cls, token): t = cls._styles[token] return { 'color': t[0] or None, 'bold': bool(t[1]), 'italic': bool(t[2]), 'underline': bool(t[3]), 'bgcolor': t[4] or None, 'border': t[5] or None } def list_styles(cls): return list(cls) def __iter__(cls): for token in cls._styles: yield token, cls.style_for_token(token) def __len__(cls): return len(cls._styles) class Style(object): __metaclass__ = StyleMeta #: overall background color (``None`` means transparent) background_color = '#ffffff' #: Style definitions for individual token types. styles = {} PKp”5²ûØ  pygments/scanner.py# -*- coding: utf-8 -*- """ 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: 2006 by Armin Ronacher. :license: BSD, see LICENSE for more details. """ import re class EndOfText(RuntimeError): """ Raise if end of text is reached and the user tried to call a match function. """ class Scanner(object): """ Simple scanner All method patterns are regular expression strings (not compiled expressions!) """ def __init__(self, text, flags=0): """ :param text: The text which should be scanned :param flags: default regular expression flags """ self.data = text self.data_length = len(text) self.start_pos = 0 self.pos = 0 self.flags = flags self.last = None self.match = None self._re_cache = {} def eos(self): """`True` if the scanner reached the end of text.""" return self.pos >= self.data_length eos = property(eos, eos.__doc__) def check(self, pattern): """ Apply `pattern` on the current position and return the match object. (Doesn't touch pos). Use this for lookahead. """ if self.eos: raise EndOfText() if pattern not in self._re_cache: self._re_cache[pattern] = re.compile(pattern, self.flags) return self._re_cache[pattern].match(self.data, self.pos) def test(self, pattern): """Apply a pattern on the current position and check if it patches. Doesn't touch pos.""" return self.check(pattern) is not None def scan(self, pattern): """ Scan the text for the given pattern and update pos/match and related fields. The return value is a boolen that indicates if the pattern matched. The matched value is stored on the instance as ``match``, the last value is stored as ``last``. ``start_pos`` is the position of the pointer before the pattern was matched, ``pos`` is the end position. """ if self.eos: raise EndOfText() if pattern not in self._re_cache: self._re_cache[pattern] = re.compile(pattern, self.flags) self.last = self.match m = self._re_cache[pattern].match(self.data, self.pos) if m is None: return False self.start_pos = m.start() self.pos = m.end() self.match = m.group() return True def get_char(self): """Scan exactly one char.""" self.scan('.') def __repr__(self): return '<%s %d/%d>' % ( self.__class__.__name__, self.pos, self.data_length ) PK™³”5×KJspygments/cmdline.pyc;ò w£‰Ec@s›dZdkZdkZdklZlZlZdklZl Z l Z dk l Z dk lZlZlZlZdZd„Zd„Zd „ZdS( s  pygments.cmdline ~~~~~~~~~~~~~~~~ Command line interface. :copyright: 2006 by Georg Brandl. :license: BSD, see LICENSE for more details. N(s __version__s __author__s highlight(sLEXERSsget_lexer_by_namesget_lexer_for_filename(s OptionError(s FORMATTERSsget_formatter_by_namesget_formatter_for_filenamesTerminalFormatters7Usage: %s [-l ] [-f ] [-O ] [-o ] [] %s -S

%(title)s

%(code)s s? %(title)s

%(title)s

%(code)s sMtd.linenos { background-color: #f0f0f0; padding-right: 10px; } %(styledefs)s cBsJtZdZd„Zd„Zd„Zdd„Zed„Zd„Z RS(s9 Output HTML tags with appropriate classes. Additional options accepted: ``nowrap`` If set to true, don't wrap the tokens at all. This disables all other options (default: False). ``noclasses`` If set to true, token s will not use CSS classes, but inline styles. ``classprefix`` Prefix for token CSS classes, is prepended to all token style classes (e.g. class="o" -> class="_o" if classprefix == '_') (default: ''). ``cssclass`` CSS class for the wrapping
(default: 'highlight'). ``cssstyles`` Inline CSS styles for the wrapping
. (default: ''). ``cssfile`` If the ``full`` option is ``True`` and this is not ``''``, put the CSS in a separate file whose name is given by this option (default: ''). New in 0.6. ``linenos`` If set to ``True``, output line numbers (default: False). ``linenostart`` The line number for the first line (default: 1). ``linenostep`` If set to a number n > 1, only every nth line number is printed (default: 1). ``linenospecial`` If set to a number n > 0, every nth line number is given a special CSS class ``special`` (default: 0). ``nobackground`` If set to ``True`` the formatter won't output the background color for the overall element (this automatically defaults to ``False`` when there is no overall element [eg: no argument for the `get_syntax_defs` method given]) (default: ``False``). New in 0.6. cKs ti||t|dtƒ|_t|dtƒ|_|iddƒ|_ |iddƒ|_ |iddƒ|_ |iddƒ|_ t|d tƒ|_ tt|d d ƒƒ|_tt|d d ƒƒ|_tt|d dƒƒ|_t|dtƒ|_h|_|iƒdS(Nsnowraps noclassess classprefixsscssclasss highlights cssstylesscssfileslinenoss linenostartis linenosteps linenospecialis nobackground(s Formatters__init__sselfsoptionss get_bool_optsFalsesnowraps noclassessgets classprefixscssclasss cssstylesscssfileslinenossabss get_int_opts linenostarts linenosteps linenospecials nobackgrounds _class_caches_create_stylesheet(sselfsoptions((s6build/bdist.linux-i686/egg/pygments/formatters/html.pys__init__‘s cCs4||ijo|i|Sn|it|ƒSdS(sUReturn the css class of this token type prefixed with the classprefix option.N(sttypesselfs _class_caches classprefixs_get_ttype_class(sselfsttype((s6build/bdist.linux-i686/egg/pygments/formatters/html.pys_get_css_class¢scCs@htd<}|_h}|_|i}x |iD]\}}|t |ƒ}d}|do|d|d7}n|do|d7}n|do|d7}n|do|d 7}n|d o|d |d 7}n|d o|d |d 7}n|o+|||<|d |t |ƒf||ss s(slncountsselfs noclassessnoclssencodingsencs ttype2classsgetsgetclss class2stylesc2ssoutfileswriteslspans tokensourcesttypesvaluesencodes escape_htmls htmlvalueslnosscountscclasssNonesparentscspans_get_css_classsclssreplace(sselfs tokensourcesoutfileslnossc2sslspans htmlvaluesnoclsswritesencsvaluesgetclsscclassslncountsttypescspanscls((s6build/bdist.linux-i686/egg/pygments/formatters/html.pys_format_nowrapâsL           c Cs¹|io|i||ƒdSn|}|i}|i} d|i o d|i |i o d|i d}| p|ot i ƒ}n|i|ƒ|idƒ|i|||ƒ} |idƒd}|oF|i} tt| | dƒƒ}|i}|i}|o{d igi}t| | | ƒD]J}|||d jo&||d jod pd ||fpdƒq2~ƒ} n`d igi}t| | | ƒD]2}|||d jod ||fpdƒq­~ƒ} |d | d}||i ƒ7}|d7}n| oj| o||i ƒd}n|i!oy1|i"}t$i%it$i%i&|ƒ|i!ƒ}Wn)t(j ot)i*dIJ|i!}nX|it+t,d|i-d|i!d|i.d|ƒƒy@t/|dƒ}|it1hd|i2dƒ<ƒ|i3ƒWqˆt4j o} d| i6| _6‚qˆXqµ|it7t,d|i-d|i2dƒd|i.d|ƒƒn*|o|i|dƒn|idƒdS(Nss
s
sis is %*ds%*ds$
s
s
s
s^Note: Cannot determine output file name, using current directory as base for the CSS file namestitlescssfilesencodingscodesws styledefssbodysError writing CSS file: (8sselfsnowraps_format_nowraps tokensourcesoutfiles realoutfileslinenosslnossfullscssclasss cssstylessdivs cStringIOsStringIOswriteslncountsrets linenostartsflslensstrsmws linenospecialssps linenostepsstsjoinsappends_[1]srangesislssgetvaluescssfilesnamesfilenamesosspathsdirnames cssfilenamesAttributeErrorssyssstderrsDOC_TEMPLATE_EXTERNALCSSsdictstitlesencodingsopenscfsCSSFILE_TEMPLATEsget_style_defssclosesIOErrorserrsstrerrors DOC_TEMPLATE(sselfs tokensourcesoutfileslnosscfs cssfilenamesmwsretsfilenameslssfullslncountsflserrsisspssts_[1]s realoutfilesdiv((s6build/bdist.linux-i686/egg/pygments/formatters/html.pysformatsj   4      {_  (   #  ( s__name__s __module__s__doc__s__init__s_get_css_classs_create_stylesheetsget_style_defssFalses_format_nowrapsformat(((s6build/bdist.linux-i686/egg/pygments/formatters/html.pys HtmlFormatterhs '    -(s__doc__ssyssoss cStringIOspygments.formatters Formatterspygments.tokensTokensTextsSTANDARD_TYPESs pygments.utils get_bool_opts get_int_opts__all__s escape_htmls get_random_ids_get_ttype_classs DOC_TEMPLATEsDOC_TEMPLATE_EXTERNALCSSsCSSFILE_TEMPLATEs HtmlFormatter(s cStringIOsSTANDARD_TYPESs__all__s DOC_TEMPLATEs escape_htmlsTextsCSSFILE_TEMPLATEs get_bool_opts get_random_idssyssTokensDOC_TEMPLATE_EXTERNALCSSs_get_ttype_classs HtmlFormatters Formattersoss get_int_opt((s6build/bdist.linux-i686/egg/pygments/formatters/html.pys? s    PK ²”581q®- - pygments/formatters/terminal.py# -*- coding: utf-8 -*- """ pygments.formatters.terminal ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Formatter for terminal output with ANSI sequences. :copyright: 2006 by Georg Brandl. :license: BSD, see LICENSE for more details. """ from pygments.formatter import Formatter from pygments.token import Keyword, Name, Comment, String, Error, \ Number, Operator, Generic, Token from pygments.console import ansiformat __all__ = ['TerminalFormatter'] #: Map token types to a tuple of color values for light and dark #: backgrounds. TERMINAL_COLORS = { Token: ('', ''), Comment: ('lightgray', 'darkgray'), Keyword: ('darkblue', 'blue'), Keyword.Type: ('teal', 'turquoise'), Operator.Word: ('purple', 'fuchsia'), Name.Builtin: ('teal', 'turquoise'), Name.Function: ('darkgreen', 'green'), Name.Namespace: ('_teal_', '_turquoise_'), Name.Class: ('_darkgreen_', '_green_'), Name.Exception: ('teal', 'turquoise'), Name.Decorator: ('darkgray', 'lightgray'), Name.Variable: ('darkred', 'red'), Name.Constant: ('darkred', 'red'), Name.Attribute: ('teal', 'turquoise'), Name.Tag: ('blue', 'blue'), String: ('brown', 'brown'), Number: ('darkblue', 'blue'), Generic.Deleted: ('red', 'red'), Generic.Inserted: ('darkgreen', 'green'), Generic.Heading: ('**', '**'), Generic.Subheading: ('*purple*', '*fuchsia*'), Generic.Error: ('red', 'red'), Error: ('_red_', '_red_'), } class TerminalFormatter(Formatter): """ Output plain text with coloring ANSI sequences. """ def __init__(self, **options): """ Accepted options: ``bg`` Set to ``'light'`` or ``'dark'`` depending on the terminal's background. ``colorscheme`` ``None`` or a dictionary mapping token types to ``(lightbg, darkbg)`` color names. """ Formatter.__init__(self, **options) self.darkbg = options.get('bg', 'light') == 'dark' self.colorscheme = options.get('colorscheme', None) or TERMINAL_COLORS def format(self, tokensource, outfile): enc = self.encoding for ttype, value in tokensource: if enc: value = value.encode(enc) color = self.colorscheme.get(ttype) while color is None: ttype = ttype[:-1] color = self.colorscheme.get(ttype) if color: color = color[self.darkbg] spl = value.split('\n') for line in spl[:-1]: if line: outfile.write(ansiformat(color, line)) outfile.write('\n') if spl[-1]: outfile.write(ansiformat(color, spl[-1])) else: outfile.write(value) PK™³”5öȰ÷ ÷ pygments/formatters/other.pyc;ò ª•‰Ec@sOdZdklZddgZdefd„ƒYZdefd„ƒYZdS(sÞ pygments.formatters.other ~~~~~~~~~~~~~~~~~~~~~~~~~ Other formatters: NullFormatter, RawTokenFormatter. :copyright: 2006 by Georg Brandl, Armin Ronacher. :license: BSD, see LICENSE for more details. (s Formatters NullFormattersRawTokenFormattercBstZdZd„ZRS(s; Output the text unchanged without any formatting. cCsR|i}xB|D]:\}}|o|i|i|ƒƒq|i|ƒqWdS(N( sselfsencodingsencs tokensourcesttypesvaluesoutfileswritesencode(sselfs tokensourcesoutfilesvaluesencsttype((s7build/bdist.linux-i686/egg/pygments/formatters/other.pysformats   (s__name__s __module__s__doc__sformat(((s7build/bdist.linux-i686/egg/pygments/formatters/other.pys NullFormatters cBs&tZdZeZd„Zd„ZRS(s( Output a raw token representation for storing token streams. The format is ``tokentyperepr(tokenstring)`` Additional options accepted: ``compress`` If set to "gz" or "bz2", compress the token stream with the given compression algorithm (default: ''). cKs)ti|||iddƒ|_dS(Nscompresss(s Formatters__init__sselfsoptionssgetscompress(sselfsoptions((s7build/bdist.linux-i686/egg/pygments/formatters/other.pys__init__.sc s7|idjo7dk} | idddˆƒ‰ˆi}ˆi} n]|idjo:dk}|idƒ‰‡‡d†}‡‡d†} nˆi}ˆi} t }d}xf|D]^\} }t|ƒ}| |jo||7}q¶|o|d ||fƒn|}| }q¶W|d ||fƒ| ƒdS( Nsgzsswbi sbz2csˆiˆi|ƒƒdS(N(soutfileswrites compressorscompressstext(stext(s compressorsoutfile(s7build/bdist.linux-i686/egg/pygments/formatters/other.pyswrite;scs!ˆiˆiƒƒˆiƒdS(N(soutfileswrites compressorsflush((soutfiles compressor(s7build/bdist.linux-i686/egg/pygments/formatters/other.pysflush=sus%s %s (sselfscompresssgzipsGzipFilesoutfileswritesflushsbz2s BZ2Compressors compressorsNoneslasttypeslastvals tokensourcesttypesvaluesrepr( sselfs tokensourcesoutfileslasttypesbz2s compressorslastvalsvalueswritesflushsgzipsttype((soutfiles compressors7build/bdist.linux-i686/egg/pygments/formatters/other.pysformat2s2          (s__name__s __module__s__doc__sFalses unicodeoutputs__init__sformat(((s7build/bdist.linux-i686/egg/pygments/formatters/other.pysRawTokenFormatters  N(s__doc__spygments.formatters Formatters__all__s NullFormattersRawTokenFormatter(s NullFormatters FormattersRawTokenFormatters__all__((s7build/bdist.linux-i686/egg/pygments/formatters/other.pys? s   PK™³”5îÓI‡pygments/formatters/rtf.pyc;ò œ‰Ec@s6dZdklZdgZdefd„ƒYZdS(s¾ pygments.formatters.rtf ~~~~~~~~~~~~~~~~~~~~~~~ A formatter that generates RTF files. :copyright: 2006 by Armin Ronacher. :license: BSD, see LICENSE for more details. (s Formatters RtfFormattercBs8tZdZeZd„Zd„Zd„Zd„ZRS(sOutput RTF (Rich Text Format).cKsSti|||idƒpd|_|idddfjo t|_ndS(s Additional options accepted: ``fontface`` Name of the font used. Could for example be ``'Courier New'`` to further specify the default which is ``' modern'``. The RTF specification claims that `` modern`` are "Fixed-pitch serif and sans serif fonts". Hope every RTF implementation thinks the same about modern... sfontfacessutf-8sutf-16sutf-32N(s Formatters__init__sselfsoptionssgetsfontfacesencodingsNone(sselfsoptions((s5build/bdist.linux-i686/egg/pygments/formatters/rtf.pys__init__s cCs,|iddƒiddƒiddƒSdS(Ns\s\\s{s\{s}s\}(stextsreplace(sselfstext((s5build/bdist.linux-i686/egg/pygments/formatters/rtf.pys_escape'scCsê| odSn|i|ƒ}|ipd}g}x•|D]}t|ƒdjoa|i|dƒpd}t|ƒdjodt|ƒ}n|i dt|ƒ|fƒq<|i t |ƒƒq<Wdi |ƒi dd ƒSdS( Nss iso-8859-15i€signores?s\'%xs \ud{\u%d%s}s s\par ( stextsselfs_escapesencodingsbufscsordsencodesansicsappendsstrsjoinsreplace(sselfstextscsencodingsansicsbuf((s5build/bdist.linux-i686/egg/pygments/formatters/rtf.pys _escape_text,s!c Cs•|id|iod|i|iƒpdƒh}d}x·|iD]¬\} }x|d|d|dfD]€}| p ||joqpn|||<|idt |d d !d ƒt |d d !d ƒt |d d !d ƒfƒ|d7}qpWqHW|idƒx||D]t\} }x(| |ijo| io | i} qW|ii| ƒ}g} |do| id||dƒn|do| id||dƒn|do| idƒn|do| idƒn|do| idƒn|do| id||dƒndi| ƒ}|o|id|ƒn|i|i|ƒƒ|o|idƒq q W|idƒdS(NsF{\rtf1\ansi\deff0{\fonttbl{\f0\fmodern\fprq1\fcharset0%s;}}{\colortbl;s siscolorsbgcolorsborders\red%d\green%d\blue%d;iiiiis}\f0s\cb%ds\cf%dsbolds\bsitalics\is underlines\uls\chbrdr\chcfpat%ds{%s s}(soutfileswritesselfsfontfaces_escapes color_mappingsoffsetsstyles_scolorsints tokensourcesttypesvaluesparentsstyle_for_tokensbufsappendsjoinsstarts _escape_text( sselfs tokensourcesoutfilesstylesstartscolorsvalues color_mappingsoffsetsttypesbufs_((s5build/bdist.linux-i686/egg/pygments/formatters/rtf.pysformatAsN2  J        ( s__name__s __module__s__doc__sFalses unicodeoutputs__init__s_escapes _escape_textsformat(((s5build/bdist.linux-i686/egg/pygments/formatters/rtf.pys RtfFormatters    N(s__doc__spygments.formatters Formatters__all__s RtfFormatter(s Formatters RtfFormatters__all__((s5build/bdist.linux-i686/egg/pygments/formatters/rtf.pys? s  PK/§”5¦²Þ°°pygments/formatters/other.py# -*- coding: utf-8 -*- """ pygments.formatters.other ~~~~~~~~~~~~~~~~~~~~~~~~~ Other formatters: NullFormatter, RawTokenFormatter. :copyright: 2006 by Georg Brandl, Armin Ronacher. :license: BSD, see LICENSE for more details. """ from pygments.formatter import Formatter __all__ = ['NullFormatter', 'RawTokenFormatter'] class NullFormatter(Formatter): """ Output the text unchanged without any formatting. """ def format(self, tokensource, outfile): enc = self.encoding for ttype, value in tokensource: if enc: outfile.write(value.encode(enc)) else: outfile.write(value) class RawTokenFormatter(Formatter): """ Output a raw token representation for storing token streams. The format is ``tokentyperepr(tokenstring)`` Additional options accepted: ``compress`` If set to "gz" or "bz2", compress the token stream with the given compression algorithm (default: ''). """ unicodeoutput = False def __init__(self, **options): Formatter.__init__(self, **options) self.compress = options.get('compress', '') def format(self, tokensource, outfile): if self.compress == 'gz': import gzip outfile = gzip.GzipFile('', 'wb', 9, outfile) write = outfile.write flush = outfile.flush elif self.compress == 'bz2': import bz2 compressor = bz2.BZ2Compressor(9) def write(text): outfile.write(compressor.compress(text)) def flush(): outfile.write(compressor.flush()) outfile.flush() else: write = outfile.write flush = outfile.flush lasttype = None lastval = u'' for ttype, value in tokensource: value = repr(value) if ttype is lasttype: lastval += value else: if lasttype: write("%s\t%s\n" % (lasttype, lastval)) lastval = value lasttype = ttype write("%s\t%s\n" % (lasttype, lastval)) flush() PK‰¤”5ƒuYî î pygments/formatters/bbcode.py# -*- coding: utf-8 -*- """ pygments.formatters.bbcode ~~~~~~~~~~~~~~~~~~~~~~~~~~ BBcode formatter. :copyright: 2006 by Lukas Meuser. :license: BSD, see LICENSE for more details. """ from pygments.formatter import Formatter from pygments.util import get_bool_opt __all__ = ['BBCodeFormatter'] class BBCodeFormatter(Formatter): """ Output BBCode tags with appropiate colors and formatting. This formatter doesn't support background colors and borders, as there are no common BBcodes for that. Some board systems (e.g. phpBB) don't support markup in their [code] tag, so you can't use the highlighting together with that tag. Text in a [code] tag usually is shown with a monospace font (which this formatter can do with the ``monofont`` option) and no spaces (which you need for indentation) are removed. Additional options accepted: ``codetag`` If set to true, put the output into [code] tags (default: false). ``monofont`` If set to true, add a tag to show the code with a monospace font (default: false). """ def __init__(self, **options): Formatter.__init__(self, **options) self._code = get_bool_opt(options, 'codetag', False) self._mono = get_bool_opt(options, 'monofont', False) self.styles = {} self._make_styles() def _make_styles(self): for ttype, ndef in self.style: start = end = '' if ndef['color']: start += '[color=#%s]' % ndef['color'] end = '[/color]' + end if ndef['bold']: start += '[b]' end = '[/b]' + end if ndef['italic']: start += '[i]' end = '[/i]' + end if ndef['underline']: start += '[u]' end = '[/u]' + end # there are no common BBcodes for background-color and border self.styles[ttype] = start, end def format(self, tokensource, outfile): if self._code: outfile.write('[code]') if self._mono: outfile.write('[font=monospace]') enc = self.encoding lastval = '' lasttype = None for ttype, value in tokensource: if enc: value = value.encode(enc) while ttype not in self.styles: ttype = ttype.parent if ttype == lasttype: lastval += value else: if lastval: start, end = self.styles[lasttype] outfile.write(''.join((start, lastval, end))) lastval = value lasttype = ttype if lastval: start, end = self.styles[lasttype] outfile.write(''.join((start, lastval, end))) if self._mono: outfile.write('[/font]') if self._code: outfile.write('[/code]') if self._code or self._mono: outfile.write('\n') PK™³”5˜ò Þ55pygments/formatters/bbcode.pyc;ò ²‰Ec@sCdZdklZdklZdgZdefd„ƒYZdS(s® pygments.formatters.bbcode ~~~~~~~~~~~~~~~~~~~~~~~~~~ BBcode formatter. :copyright: 2006 by Lukas Meuser. :license: BSD, see LICENSE for more details. (s Formatter(s get_bool_optsBBCodeFormattercBs)tZdZd„Zd„Zd„ZRS(sñ Output BBCode tags with appropiate colors and formatting. This formatter doesn't support background colors and borders, as there are no common BBcodes for that. Some board systems (e.g. phpBB) don't support markup in their [code] tag, so you can't use the highlighting together with that tag. Text in a [code] tag usually is shown with a monospace font (which this formatter can do with the ``monofont`` option) and no spaces (which you need for indentation) are removed. Additional options accepted: ``codetag`` If set to true, put the output into [code] tags (default: false). ``monofont`` If set to true, add a tag to show the code with a monospace font (default: false). cKsQti||t|dtƒ|_t|dtƒ|_h|_|i ƒdS(Nscodetagsmonofont( s Formatters__init__sselfsoptionss get_bool_optsFalses_codes_monosstyless _make_styles(sselfsoptions((s8build/bdist.linux-i686/egg/pygments/formatters/bbcode.pys__init__*s  cCsÏxÈ|iD]½\}}d}}|do |d|d7}d|}n|do|d7}d|}n|do|d 7}d |}n|d o|d 7}d |}n||f|i| 128: ansic = c.encode(encoding, 'ignore') or '?' if ord(ansic) > 128: ansic = '\\\'%x' % ord(ansic) buf.append(r'\ud{\u%d%s}' % (ord(c), ansic)) else: buf.append(str(c)) return ''.join(buf).replace('\n', '\\par\n') def format(self, tokensource, outfile): # rtf 1.8 header outfile.write(r'{\rtf1\ansi\deff0' r'{\fonttbl{\f0\fmodern\fprq1\fcharset0%s;}}' r'{\colortbl;' % (self.fontface and ' ' + self._escape(self.fontface) or '')) # convert colors and save them in a mapping to access them later. color_mapping = {} offset = 1 for _, style in self.style: for color in style['color'], style['bgcolor'], style['border']: if not color or color in color_mapping: continue color_mapping[color] = offset outfile.write(r'\red%d\green%d\blue%d;' % ( int(color[0:2], 16), int(color[2:4], 16), int(color[4:6], 16) )) offset += 1 outfile.write(r'}\f0') # highlight stream for ttype, value in tokensource: while ttype not in self.style and ttype.parent: ttype = ttype.parent style = self.style.style_for_token(ttype) buf = [] if style['bgcolor']: buf.append(r'\cb%d' % color_mapping[style['bgcolor']]) if style['color']: buf.append(r'\cf%d' % color_mapping[style['color']]) if style['bold']: buf.append(r'\b') if style['italic']: buf.append(r'\i') if style['underline']: buf.append(r'\ul') if style['border']: buf.append(r'\chbrdr\chcfpat%d' % color_mapping[style['border']]) start = ''.join(buf) if start: outfile.write('{%s ' % start) outfile.write(self._escape_text(value)) if start: outfile.write('}') outfile.write('}') PK.£”5&*sïÕ.Õ.pygments/formatters/html.py# -*- coding: utf-8 -*- """ pygments.formatters.html ~~~~~~~~~~~~~~~~~~~~~~~~ Formatter for HTML output. :copyright: 2006 by Georg Brandl, Armin Ronacher. :license: BSD, see LICENSE for more details. """ import sys, os import cStringIO from pygments.formatter import Formatter from pygments.token import Token, Text, STANDARD_TYPES from pygments.util import get_bool_opt, get_int_opt __all__ = ['HtmlFormatter'] def escape_html(text): """Escape &, <, > as well as single and double quotes for HTML.""" return text.replace('&', '&'). \ replace('<', '<'). \ replace('>', '>'). \ replace('"', '"'). \ replace("'", ''') def get_random_id(): """Return a random id for javascript fields.""" from random import random from time import time try: from hashlib import sha1 as sha except ImportError: import sha sha = sha.new return sha('%s|%s' % (random(), time())).hexdigest() def _get_ttype_class(ttype): fname = STANDARD_TYPES.get(ttype) if fname: return fname aname = '' while fname is None: aname = '-' + ttype[-1] + aname ttype = ttype.parent fname = STANDARD_TYPES.get(ttype, '') return fname + aname DOC_TEMPLATE = '''\ %(title)s

%(title)s

%(code)s ''' DOC_TEMPLATE_EXTERNALCSS = '''\ %(title)s

%(title)s

%(code)s ''' CSSFILE_TEMPLATE = '''\ td.linenos { background-color: #f0f0f0; padding-right: 10px; } %(styledefs)s ''' class HtmlFormatter(Formatter): """ Output HTML tags with appropriate classes. Additional options accepted: ``nowrap`` If set to true, don't wrap the tokens at all. This disables all other options (default: False). ``noclasses`` If set to true, token s will not use CSS classes, but inline styles. ``classprefix`` Prefix for token CSS classes, is prepended to all token style classes (e.g. class="o" -> class="_o" if classprefix == '_') (default: ''). ``cssclass`` CSS class for the wrapping
(default: 'highlight'). ``cssstyles`` Inline CSS styles for the wrapping
. (default: ''). ``cssfile`` If the ``full`` option is ``True`` and this is not ``''``, put the CSS in a separate file whose name is given by this option (default: ''). New in 0.6. ``linenos`` If set to ``True``, output line numbers (default: False). ``linenostart`` The line number for the first line (default: 1). ``linenostep`` If set to a number n > 1, only every nth line number is printed (default: 1). ``linenospecial`` If set to a number n > 0, every nth line number is given a special CSS class ``special`` (default: 0). ``nobackground`` If set to ``True`` the formatter won't output the background color for the overall element (this automatically defaults to ``False`` when there is no overall element [eg: no argument for the `get_syntax_defs` method given]) (default: ``False``). New in 0.6. """ def __init__(self, **options): Formatter.__init__(self, **options) self.nowrap = get_bool_opt(options, 'nowrap', False) self.noclasses = get_bool_opt(options, 'noclasses', False) self.classprefix = options.get('classprefix', '') self.cssclass = options.get('cssclass', 'highlight') self.cssstyles = options.get('cssstyles', '') self.cssfile = options.get('cssfile', '') self.linenos = get_bool_opt(options, 'linenos', False) self.linenostart = abs(get_int_opt(options, 'linenostart', 1)) self.linenostep = abs(get_int_opt(options, 'linenostep', 1)) self.linenospecial = abs(get_int_opt(options, 'linenospecial', 0)) self.nobackground = get_bool_opt(options, 'nobackground', False) self._class_cache = {} self._create_stylesheet() def _get_css_class(self, ttype): """Return the css class of this token type prefixed with the classprefix option.""" if ttype in self._class_cache: return self._class_cache[ttype] return self.classprefix + _get_ttype_class(ttype) def _create_stylesheet(self): t2c = self.ttype2class = {Token: ''} c2s = self.class2style = {} cp = self.classprefix for ttype, ndef in self.style: name = cp + _get_ttype_class(ttype) style = '' if ndef['color']: style += 'color: #%s; ' % ndef['color'] if ndef['bold']: style += 'font-weight: bold; ' if ndef['italic']: style += 'font-style: italic; ' if ndef['underline']: style += 'text-decoration: underline; ' if ndef['bgcolor']: style += 'background-color: #%s; ' % ndef['bgcolor'] if ndef['border']: style += 'border: 1px solid #%s; ' % ndef['border'] if style: t2c[ttype] = name # save len(ttype) to enable ordering the styles by # hierarchy (necessary for CSS cascading rules!) c2s[name] = (style[:-2], ttype, len(ttype)) def get_style_defs(self, arg=''): """ Return CSS style definitions for the classes produced by the current highlighting style. ``arg`` can be a string of selectors to insert before the token type classes. """ if isinstance(arg, basestring): args = [arg] else: args = list(arg) def prefix(cls): tmp = [] for arg in args: tmp.append((arg and arg + ' ' or '') + '.' + cls) return ', '.join(tmp) styles = [(level, ttype, cls, style) for cls, (style, ttype, level) in self.class2style.iteritems() if cls and style] styles.sort() lines = ['%s { %s } /* %s */' % (prefix(cls), style, repr(ttype)[6:]) for level, ttype, cls, style in styles] if arg and not self.nobackground and \ self.style.background_color is not None: text_style = '' if Text in self.ttype2class: text_style = ' ' + self.class2style[self.ttype2class[Text]][0] lines.insert(0, '%s{ background: %s;%s }' % (arg, self.style.background_color, text_style)) return '\n'.join(lines) def _format_nowrap(self, tokensource, outfile, lnos=False): lncount = 0 nocls = self.noclasses enc = self.encoding # for lookup only getcls = self.ttype2class.get c2s = self.class2style write = outfile.write lspan = '' for ttype, value in tokensource: if enc: value = value.encode(enc) htmlvalue = escape_html(value) if lnos: lncount += value.count("\n") if nocls: cclass = getcls(ttype) while cclass is None: ttype = ttype.parent cclass = getcls(ttype) cspan = cclass and '' % c2s[cclass][0] else: cls = self._get_css_class(ttype) cspan = cls and '' % cls if cspan == lspan: if not cspan: write(htmlvalue) else: write(htmlvalue.replace('\n', '\n' + cspan)) elif htmlvalue: # if no value, leave old span open if lspan: write('') lspan = cspan if cspan: htmlvalue = htmlvalue.replace('\n', '\n' + cspan) write(cspan + htmlvalue) else: write(htmlvalue) if lspan: write('') return lncount def format(self, tokensource, outfile): if self.nowrap: self._format_nowrap(tokensource, outfile) return realoutfile = outfile lnos = self.linenos full = self.full div = ('') if full or lnos: outfile = cStringIO.StringIO() else: outfile.write(div) outfile.write('
')
        lncount = self._format_nowrap(tokensource, outfile, lnos)
        outfile.write('
') ret = '' if lnos: fl = self.linenostart mw = len(str(lncount + fl - 1)) sp = self.linenospecial st = self.linenostep if sp: ls = '\n'.join([(i%st == 0 and (i%sp == 0 and '%*d' or '%*d') % (mw, i) or '') for i in range(fl, fl + lncount)]) else: ls = '\n'.join([(i%st == 0 and ('%*d' % (mw, i)) or '') for i in range(fl, fl + lncount)]) ret = div + ('' '
' +
                         ls + '
') ret += outfile.getvalue() ret += '
' if full: if not ret: ret = div + outfile.getvalue() + '
\n' if self.cssfile: try: filename = realoutfile.name cssfilename = os.path.join(os.path.dirname(filename), self.cssfile) except AttributeError: print >>sys.stderr, 'Note: Cannot determine output file name, ' \ 'using current directory as base for the CSS file name' cssfilename = self.cssfile realoutfile.write(DOC_TEMPLATE_EXTERNALCSS % dict(title = self.title, cssfile = self.cssfile, encoding = self.encoding, code = ret)) try: cf = open(cssfilename, "w") cf.write(CSSFILE_TEMPLATE % {'styledefs': self.get_style_defs('body')}) cf.close() except IOError, err: err.strerror = 'Error writing CSS file: ' + err.strerror raise else: realoutfile.write(DOC_TEMPLATE % dict(title = self.title, styledefs = self.get_style_defs('body'), encoding = self.encoding, code = ret)) elif lnos: realoutfile.write(ret + '
\n') else: realoutfile.write('
\n') PK™³”5µfÙÉÉpygments/formatters/latex.pyc;ò ‰Ec@sndZdkZdklZdklZdklZlZdgZ d„Z dZ defd„ƒYZ dS( s¿ pygments.formatters.latex ~~~~~~~~~~~~~~~~~~~~~~~~~ Formatter for LaTeX fancyvrb output. :copyright: 2006 by Georg Brandl. :license: BSD, see LICENSE for more details. N(s Formatter(sToken(s get_bool_opts get_int_optsLatexFormattercCsP|iddƒiddƒiddƒiddƒiddƒidd ƒSdS( Ns@ss[ss]ss@at[]s@lb[]s@rb[](stextsreplace(stext((s7build/bdist.linux-i686/egg/pygments/formatters/latex.pys escape_texssÈ \documentclass{%(docclass)s} \usepackage{fancyvrb} \usepackage{color} \usepackage[%(encoding)s]{inputenc} %(preamble)s %(styledefs)s \begin{document} \section*{%(title)s} %(code)s \end{document} cBs5tZdZd„Zd„Zdd„Zd„ZRS(s@ Output LaTeX "color" and "fancyvrb" control sequences. cKs½ti|||iddƒ|_|iddƒ|_t|dtƒ|_ t t |ddƒƒ|_ t t |ddƒƒ|_ |id dƒ|_t|d tƒ|_|iƒd S( sŸ Additional options accepted: ``docclass`` If ``full`` is true, this is the document class to use (default: 'article'). ``preamble`` If ``full`` is true, this can be further preamble commands (default: ''). ``linenos`` If true, output line numbers (default: False). ``linenostart`` The line number for the first line (default: 1). ``linenostep`` If set to a number n > 1, only every nth line number is printed (default: 1). ``verboptions`` Additional options given to the Verbatim environment (default: ''). ``nobackground`` If set to ``True`` the formatter won't output the background color for the overall element (default: ``False``) Note that light colors on dark background with this option disabled won't be readable very good. sdocclasssarticlespreamblesslinenoss linenostartis linenosteps verboptionss nobackgroundN(s Formatters__init__sselfsoptionssgetsdocclassspreambles get_bool_optsFalseslinenossabss get_int_opts linenostarts linenosteps verboptionss nobackgrounds_create_stylecmds(sselfsoptions((s7build/bdist.linux-i686/egg/pygments/formatters/latex.pys__init__5sc CsÛhtd<} |_h}|_d}t|ƒ} t|ƒ}| i ƒ} d„}x~|i D]s\}}d}|dod|d}n|dod |d}n|d od |d}n|d od ||d ƒ|f}n|do+d||dƒ||dƒ|f}n*|dod||dƒ|f}n|djoq`nyd| |i ƒ}Wn?tj o3| i ƒ} t|ƒ}d| |i ƒ}nX|| |<||| 1, only every nth line number is printed (default: 1). ``verboptions`` Additional options given to the Verbatim environment (default: ''). ``nobackground`` If set to ``True`` the formatter won't output the background color for the overall element (default: ``False``) Note that light colors on dark background with this option disabled won't be readable very good. """ Formatter.__init__(self, **options) self.docclass = options.get('docclass', 'article') self.preamble = options.get('preamble', '') self.linenos = get_bool_opt(options, 'linenos', False) self.linenostart = abs(get_int_opt(options, 'linenostart', 1)) self.linenostep = abs(get_int_opt(options, 'linenostep', 1)) self.verboptions = options.get('verboptions', '') self.nobackground = get_bool_opt(options, 'nobackground', False) self._create_stylecmds() def _create_stylecmds(self): t2c = self.ttype2cmd = {Token: ''} c2d = self.cmd2def = {} letters = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ' first = iter(letters) second = iter(letters) firstl = first.next() def rgbcolor(col): if col: return ','.join(['%.2f' %(int(col[i] + col[i + 1], 16) / 255.0) for i in (0, 2, 4)]) else: return '1,1,1' for ttype, ndef in self.style: cmndef = '#1' if ndef['bold']: cmndef = r'\textbf{' + cmndef + '}' if ndef['italic']: cmndef = r'\textit{' + cmndef + '}' if ndef['underline']: cmndef = r'\underline{' + cmndef + '}' if ndef['color']: cmndef = r'\textcolor[rgb]{%s}{%s}' % ( rgbcolor(ndef['color']), cmndef ) if ndef['border']: cmndef = r'\fcolorbox[rgb]{%s}{%s}{%s}' % ( rgbcolor(ndef['border']), rgbcolor(ndef['bgcolor']), cmndef ) elif ndef['bgcolor']: cmndef = r'\colorbox[rgb]{%s}{%s}' % ( rgbcolor(ndef['bgcolor']), cmndef ) if cmndef == '#1': continue try: alias = 'C' + firstl + second.next() except StopIteration: firstl = first.next() second = iter(letters) alias = 'C' + firstl + second.next() t2c[ttype] = alias c2d[alias] = cmndef def get_style_defs(self, arg=''): """ Return the \\newcommand sequences needed to define the commands used to format text in the verbatim environment. If ``arg`` is given and true, use \\renewcommand instead. """ nc = (arg and r'\renewcommand' or r'\newcommand') return '%s\\at{@}\n%s\\lb{[}\n%s\\rb{]}\n' % (nc, nc, nc) + \ '\n'.join(['%s\\%s[1]{%s}' % (nc, alias, cmndef) for alias, cmndef in self.cmd2def.iteritems() if cmndef != '#1']) def format(self, tokensource, outfile): # TODO: add support for background colors enc = self.encoding if self.full: realoutfile = outfile outfile = cStringIO.StringIO() outfile.write(r'\begin{Verbatim}[commandchars=@\[\]') if self.linenos: start, step = self.linenostart, self.linenostep outfile.write(',numbers=left' + (start and ',firstnumber=%d' % start or '') + (step and ',stepnumber=%d' % step or '')) if self.verboptions: outfile.write(',' + self.verboptions) outfile.write(']\n') for ttype, value in tokensource: if enc: value = value.encode(enc) value = escape_tex(value) cmd = self.ttype2cmd.get(ttype) while cmd is None: ttype = ttype.parent cmd = self.ttype2cmd.get(ttype) if cmd: spl = value.split('\n') for line in spl[:-1]: if line: outfile.write("@%s[%s]" % (cmd, line)) outfile.write('\n') if spl[-1]: outfile.write("@%s[%s]" % (cmd, spl[-1])) else: outfile.write(value) outfile.write('\n\\end{Verbatim}\n') if self.full: realoutfile.write(DOC_TEMPLATE % dict(docclass = self.docclass, preamble = self.preamble, title = self.title, encoding = self.encoding, styledefs = self.get_style_defs(), code = outfile.getvalue())) PKŽcŠ5‹I9Ê¥¥pygments/styles/native.py# -*- coding: utf-8 -*- """ pygments.styles.native ~~~~~~~~~~~~~~~~~~~~~~ pygments version of my "native" vim theme. :copyright: 2006 by Armin Ronacher. :license: BSD, see LICENSE for more details. """ from pygments.style import Style from pygments.token import Keyword, Name, Comment, String, Error, \ Number, Operator, Generic, Token class NativeStyle(Style): background_color = '#202020' styles = { Token: '#d0d0d0', Comment: 'italic #999999', Comment.Preproc: 'noitalic bold #cd2828', Keyword: 'bold #6ab825', Keyword.Pseudo: 'nobold', Operator.Word: 'bold #6ab825', String: '#ed9d13', String.Other: '#ffa500', Number: '#3677a9', Name.Builtin: '#24909d', Name.Variable: '#40ffff', Name.Constant: '#40ffff', Name.Class: 'underline #447fcf', Name.Function: '#447fcf', Name.Namespace: 'underline #447fcf', Name.Exception: '#bbbbbb', Name.Tag: 'bold #6ab825', Name.Attribute: '#bbbbbb', Name.Decorator: '#ffa500', Generic.Heading: 'bold #ffffff', Generic.Subheading: 'underline #ffffff', Generic.Deleted: '#d22323', Generic.Inserted: '#589819', Generic.Error: '#d22323', Generic.Emph: 'italic', Generic.Strong: 'bold', Generic.Prompt: '#aaaaaa', Generic.Output: '#cccccc', Generic.Traceback: '#d22323', Error: 'bg:#e3d2d2 #a61717' } PK™³”5 sŸ Ÿ pygments/styles/default.pyc;ò ]ï{Ec@sddZdklZdklZlZlZlZlZl Z l Z l Z defd„ƒYZ dS(sà pygments.styles.default ~~~~~~~~~~~~~~~~~~~~~~~ The default highlighting style for Pygments. :copyright: 2006 by Georg Brandl. :license: BSD, see LICENSE for more details. (sStyle(sKeywordsNamesCommentsStringsErrorsNumbersOperatorsGenerics DefaultStylecBsÖtZdZdZdZhed<eid<ed<eid<ei d<e d<e i d<e i d<e id <e id <e id <e id <e id <e id<e id<e id<e id<e id<e id<ed<eid<eid<eid<eid<eid <eid<e d<e!i"d<e!i#d<e!i$d<e!i%d <e!i&d<e!i'd<e!i(d<e!i)d<e!i*d<e!i+d<e&d. :license: BSD, see LICENSE for more details. """ from pygments.style import Style from pygments.token import Keyword, Name, Comment, String, Error, \ Number, Operator, Generic class ManniStyle(Style): background_color = '#f0f3f3' styles = { Comment: 'italic #0099FF', Comment.Preproc: 'noitalic #009999', Keyword: 'bold #006699', Keyword.Pseudo: 'nobold', Keyword.Type: '#007788', Operator: '#555555', Operator.Word: 'bold #000000', Name.Builtin: '#336666', Name.Function: '#CC00FF', Name.Class: 'bold #00AA88', Name.Namespace: 'bold #00CCFF', Name.Exception: 'bold #CC0000', Name.Variable: '#003333', Name.Constant: '#336600', Name.Label: '#9999FF', Name.Entity: 'bold #999999', Name.Attribute: '#330099', Name.Tag: 'bold #330099', Name.Decorator: '#9999FF', String: '#CC3300', String.Doc: 'italic', String.Interpol: '#AA0000', String.Escape: 'bold #CC3300', String.Regex: '#33AAAA', String.Symbol: '#FFCC33', String.Other: '#CC3300', Number: '#FF6600', Generic.Heading: 'bold #003300', Generic.Subheading: 'bold #003300', Generic.Deleted: 'border:#CC0000 bg:#FFCCCC', Generic.Inserted: 'border:#00CC00 bg:#CCFFCC', Generic.Error: '#FF0000', Generic.Emph: 'italic', Generic.Strong: 'bold', Generic.Prompt: 'bold #000099', Generic.Output: '#AAAAAA', Generic.Traceback: '#99CC66', Error: 'bg:#FFAAAA #AA0000' } PKŽcŠ5dIi*  pygments/styles/borland.py# -*- coding: utf-8 -*- """ pygments.styles.borland ~~~~~~~~~~~~~~~~~~~~~~~ Style similar to the style used in the borland ides. :copyright: 2006 by Armin Ronacher. :license: BSD, see LICENSE for more details. """ from pygments.style import Style from pygments.token import Keyword, Name, Comment, String, Error, \ Number, Operator, Generic class BorlandStyle(Style): default_style = '' styles = { Comment: 'italic #008800', Comment.Preproc: 'noitalic', String: '#0000FF', Number: '#0000FF', Keyword: 'bold', Operator.Word: 'bold', Name.Tag: 'bold', Name.Attribute: 'italic', Generic.Heading: '#999999', Generic.Subheading: '#aaaaaa', Generic.Deleted: 'bg:#ffdddd #000000', Generic.Inserted: 'bg:#ddffdd #000000', Generic.Error: '#aa0000', Generic.Emph: 'italic', Generic.Strong: 'bold', Generic.Prompt: '#555555', Generic.Output: '#888888', Generic.Traceback: '#aa0000', Error: 'bg:#e3d2d2 #a61717' } PK™³”5ú‡xN\\pygments/styles/native.pyc;ò ]ï{Ec@sjdZdklZdklZlZlZlZlZl Z l Z l Z l Z defd„ƒYZ dS(sÁ pygments.styles.native ~~~~~~~~~~~~~~~~~~~~~~ pygments version of my "native" vim theme. :copyright: 2006 by Armin Ronacher. :license: BSD, see LICENSE for more details. (sStyle( sKeywordsNamesCommentsStringsErrorsNumbersOperatorsGenericsTokens NativeStylecBsjtZdZhed<ed<eid<ed<eid<ei d<e d<e i d<e d <e id <e id <e id <e id <e id <e id <e id<e id<e id<e id<eid<eid<eid<eid<eid<eid<eid<ei d<ei!d<ei"d<ed. :license: BSD, see LICENSE for more details. (sStyle(sKeywordsNamesCommentsStringsErrorsNumbersOperatorsGenerics ManniStylecBsÊtZdZhed<eid<ed<eid<eid<ed<ei d<e i d <e i d <e i d <e id <e id <e id<e id<e id<e id<e id<e id<e id<ed<eid<eid<eid<eid<eid<eid<ed<ei d<ei!d<ei"d<ei#d<ei$d<ei%d<ei&d<ei'd <ei(d!<ei)d"<e$d#`__ is installable via *easy_install* with ``easy_install Pygments==dev``. :copyright: 2006 by Georg Brandl, Armin Ronacher, Lukas Meuser and others. :license: BSD, see LICENSE for more details. Keywords: syntax highlighting Platform: any Classifier: License :: OSI Approved :: BSD License Classifier: Intended Audience :: Developers Classifier: Intended Audience :: End Users/Desktop Classifier: Intended Audience :: System Administrators Classifier: Development Status :: 3 - Alpha Classifier: Programming Language :: Python Classifier: Operating System :: OS Independent PK™³”5“×2EGG-INFO/dependency_links.txt PK™³”5‘Ä5Ê  EGG-INFO/SOURCES.txtAUTHORS CHANGES LICENSE Makefile TODO ez_setup.py lgpl.txt pygmentize setup.cfg setup.py Pygments.egg-info/PKG-INFO Pygments.egg-info/SOURCES.txt Pygments.egg-info/dependency_links.txt Pygments.egg-info/not-zip-safe Pygments.egg-info/top_level.txt docs/generate.py docs/pygments.1 docs/src/api.txt docs/src/cmdline.txt docs/src/formatterdev.txt docs/src/formatters.txt docs/src/index.txt docs/src/installation.txt docs/src/lexerdevelopment.txt docs/src/lexers.txt docs/src/plugins.txt docs/src/quickstart.txt docs/src/rstdirective.txt docs/src/styles.txt docs/src/tokens.txt pygments/__init__.py pygments/cmdline.py pygments/console.py pygments/formatter.py pygments/lexer.py pygments/plugin.py pygments/scanner.py pygments/style.py pygments/token.py pygments/util.py pygments/formatters/__init__.py pygments/formatters/bbcode.py pygments/formatters/html.py pygments/formatters/latex.py pygments/formatters/other.py pygments/formatters/rtf.py pygments/formatters/terminal.py pygments/lexers/__init__.py pygments/lexers/_luabuiltins.py pygments/lexers/_mapping.py pygments/lexers/_phpbuiltins.py pygments/lexers/agile.py pygments/lexers/compiled.py pygments/lexers/dotnet.py pygments/lexers/other.py pygments/lexers/special.py pygments/lexers/templates.py pygments/lexers/text.py pygments/lexers/web.py pygments/styles/__init__.py pygments/styles/autumn.py pygments/styles/borland.py pygments/styles/colorful.py pygments/styles/default.py pygments/styles/friendly.py pygments/styles/manni.py pygments/styles/murphy.py pygments/styles/native.py pygments/styles/pastie.py pygments/styles/perldoc.py pygments/styles/trac.py scripts/check_sources.py scripts/count_loc.py scripts/epydoc.css scripts/find_abandoned_lexers.py scripts/find_codetags.py scripts/find_error.py scripts/fix_epydoc_markup.py scripts/pylintrc scripts/reindent.py scripts/vim2pygments.py tests/run.py tests/test_basic_api.py tests/test_clexer.py tests/test_cmdline.py tests/test_examplefiles.py tests/test_html_formatter.py tests/examplefiles/Intro.java tests/examplefiles/apache2.conf tests/examplefiles/boot-9.scm tests/examplefiles/ceval.c tests/examplefiles/condensed_ruby.rb tests/examplefiles/django_sample.html+django tests/examplefiles/example.c tests/examplefiles/example.cpp tests/examplefiles/example.pas tests/examplefiles/example.rb tests/examplefiles/example.rhtml tests/examplefiles/example.xhtml tests/examplefiles/example.xml tests/examplefiles/fucked_up.rb tests/examplefiles/genshi_example.xml+genshi tests/examplefiles/genshitext_example.genshitext tests/examplefiles/ltmain.sh tests/examplefiles/multiline_regexes.rb tests/examplefiles/numbers.c tests/examplefiles/perl5db.pl tests/examplefiles/perlfunc.1 tests/examplefiles/pleac.in.rb tests/examplefiles/smarty_example.html tests/examplefiles/test.bas tests/examplefiles/test.boo tests/examplefiles/test.cs tests/examplefiles/test.css tests/examplefiles/test.html tests/examplefiles/test.java tests/examplefiles/test.myt tests/examplefiles/test.pas tests/examplefiles/test.php tests/examplefiles/test.rb tests/examplefiles/test.rhtml PK™³”5…HÚb EGG-INFO/top_level.txtpygments PK¨²”5“×2EGG-INFO/not-zip-safe PK)³”5rÀ4»]]EGG-INFO/scripts/pygmentize#!/usr/bin/python2.3 import sys, pygments.cmdline sys.exit(pygments.cmdline.main(sys.argv)) PKŽcŠ5Ïœ4m m ¤pygments/style.pyPKp”5²ûØ  ¤œ pygments/scanner.pyPK™³”5×KJs¤Ýpygments/cmdline.pycPK™³”5L@nEE¤3pygments/style.pycPK ¯”5aÆcg¤…Bpygments/cmdline.pyPKŽcŠ5|mÖ..¤¶[pygments/console.pyPK™³”5²›eÇǤcpygments/scanner.pycPK™³”5†ÝõÏú ú ¤upygments/console.pycPK™³”5Îm†Ð% % ¤:pygments/plugin.pycPK™³”5p:ËÏè褈pygments/token.pycPKÛt”5ÜÏÊÀþJþJ¤¨›pygments/lexer.pyPK™³”5h›64€€¤Õæpygments/__init__.pycPKŽcŠ5Óìd7zz¤ˆõpygments/token.pyPKŽ”5®V:GG¤1 pygments/util.pyPK™³”5ðY¿è è ¤¦pygments/formatter.pycPKd¨”5WYò&  ¤Â'pygments/formatter.pyPK™³”5Ø™Ö4ÅUÅU¤ 1pygments/lexer.pycPKd¨”5>^Šv v ¤‡pygments/__init__.pyPKŽcŠ5VidÏã㤨‘pygments/plugin.pyPK™³”53~ÃOO¤»—pygments/util.pycPKl“’5ÐXP’ë–ë–¤9±pygments/lexers/agile.pyPK}”58\pçç"ç"¤ZHpygments/lexers/_mapping.pyPK™³”5þ”à^ï‰ï‰¤zkpygments/lexers/templates.pycPK…¥”5ð”®ïöŠöФ¤õpygments/lexers/compiled.pyPK™³”54Ø‘Nq#q#¤Ó€pygments/lexers/other.pycPKÑ€”5´oÛ‰¢%¢%¤{¤pygments/lexers/other.pyPK£5ßξ› › ¤SÊpygments/lexers/special.pyPK™³”5·MQ²yy¤&Ôpygments/lexers/compiled.pycPK™³”5x~ÕâÝ9Ý9 ¤|Mpygments/lexers/_phpbuiltins.pycPK ~”5?=ç5%5%¤—‡pygments/lexers/text.pyPK™³”5…â*ª*ª*¤­pygments/lexers/text.pycPK™³”5“î$ì‹ ‹ ¤á×pygments/lexers/dotnet.pycPKŽcŠ5±»k‹žž¤¤øpygments/lexers/_phpbuiltins.pyPK™³”5PÁ™p  ¤`—pygments/lexers/__init__.pycPK™³”5¿- c¤´·pygments/lexers/agile.pycPK™³”5,kTþþ¤ˆ7pygments/lexers/special.pycPKE”5›-ó¯JBJB¤¿Fpygments/lexers/web.pyPKå“’5íÁ\ÅËWËW¤=‰pygments/lexers/templates.pyPK™³”5'€õ!õ! ¤Bápygments/lexers/_luabuiltins.pycPK5”’5tqrƒÇ#Ç#¤u pygments/lexers/dotnet.pyPKŽcŠ5ó gpii¤s' pygments/lexers/_luabuiltins.pyPK™³”5{nññ½?½?¤C pygments/lexers/web.pycPKT”5ù>›±ÑѤ ƒ pygments/lexers/__init__.pyPK™³”5÷2b#b#¤š pygments/lexers/_mapping.pycPK™³”5`dBjj ¤±½ pygments/formatters/terminal.pycPK™³”5îAˆ#{2{2¤YÌ pygments/formatters/html.pycPK ²”581q®- - ¤ÿ pygments/formatters/terminal.pyPK™³”5öȰ÷ ÷ ¤x pygments/formatters/other.pycPK™³”5îÓI‡¤ª pygments/formatters/rtf.pycPK/§”5¦²Þ°°¤* pygments/formatters/other.pyPK‰¤”5ƒuYî î ¤ì2 pygments/formatters/bbcode.pyPK™³”5˜ò Þ55¤? pygments/formatters/bbcode.pycPK™³”5ð v¸ŠŠ ¤†M pygments/formatters/__init__.pycPK«”5Jñ}þþ¤N^ pygments/formatters/rtf.pyPK.£”5&*sïÕ.Õ.¤„m pygments/formatters/html.pyPK™³”5µfÙÉɤ’œ pygments/formatters/latex.pycPKâP5hÉPÄ Ä ¤–¹ pygments/formatters/__init__.pyPK1¤”5jFÆÆ¤—Å pygments/formatters/latex.pyPKŽcŠ5‹I9Ê¥¥¤—ß pygments/styles/native.pyPK™³”5 sŸ Ÿ ¤sæ pygments/styles/default.pycPKŽcŠ5sLé&  ¤Kð pygments/styles/colorful.pyPK™³”5^Â} } ¤™ú pygments/styles/colorful.pycPKŽcŠ5Ëää¤P pygments/styles/pastie.pyPKŽcŠ5F¡eÒ  ¤k pygments/styles/murphy.pyPK™³”5Ÿ'£ £ ¤ª pygments/styles/friendly.pycPK™³”53á”X&&¤‡" pygments/styles/autumn.pycPKŽcŠ5h’Z®®¤å* pygments/styles/perldoc.pyPK™³”5ÑZ„Qa a ¤Ë2 pygments/styles/murphy.pycPK±cŠ5<†œœ¤d= pygments/styles/manni.pyPKŽcŠ5dIi*  ¤6F pygments/styles/borland.pyPK™³”5ú‡xN\\¤xK pygments/styles/native.pycPKŽcŠ5Š—âÕÕ¤ T pygments/styles/trac.pyPK™³”5£$ß@ÀÀ¤[ pygments/styles/__init__.pycPK™³”56—B B ¤c pygments/styles/manni.pycPKŽcŠ5¬*¼Ç  ¤‰m pygments/styles/default.pyPK™³”59â°Ž¹¹¤Þv pygments/styles/borland.pycPKŽcŠ5›†¤Ð} pygments/styles/autumn.pyPKŽcŠ5Ã?†jVV¤ˆ… pygments/styles/__init__.pyPK™³”5¦:†&¬ ¬ ¤‹ pygments/styles/pastie.pycPK™³”5'öV3ÚÚ¤û” pygments/styles/perldoc.pycPKŽcŠ5’Ï  ¤ž pygments/styles/friendly.pyPK™³”5,@Ç  ¤L§ pygments/styles/trac.pycPK™³”5b‹e±±¤‹¯ EGG-INFO/PKG-INFOPK™³”5“×2¤k¶ EGG-INFO/dependency_links.txtPK™³”5‘Ä5Ê  ¤§¶ EGG-INFO/SOURCES.txtPK™³”5…HÚb ¤Û EGG-INFO/top_level.txtPK¨²”5“×2¤à EGG-INFO/not-zip-safePK)³”5rÀ4»]]íLà EGG-INFO/scripts/pygmentizePKXXYâÃ