Ñò ô†³Kc@sdZddkZddkZddklZd„Zdefd„ƒYZdefd„ƒYZd efd „ƒYZ d Z d Z e d „Z d„ZeidƒZeidƒZeidƒZe de d„Ze de d„Zdd„Zddd„Zddd„ZdS(sG Formatters for the exception data that comes from ExceptionCollector. iÿÿÿÿN(t PySourceColorcCstit|ƒtƒS(N(tcgitescapetstrtTrue(ts((s>/usr/lib/python2.6/site-packages/paste/exceptions/formatter.pyt html_quotestAbstractFormattercBsMeZddgZeeedd„Zd„Zd„Zd„Zd„Z RS(tobjectt source_urlcCs(||_||_||_||_dS(N(tshow_hidden_framesttrim_source_pathstinclude_reusabletshow_extra_data(tselfR R R R ((s>/usr/lib/python2.6/site-packages/paste/exceptions/formatter.pyt__init__s   c Cs¯h}|iox~|iiƒD]i\}}t|tƒo|\}}nd|}}x-|D]%}|i|||ƒ|||f/usr/lib/python2.6/site-packages/paste/exceptions/formatter.pytformat_collected_datas†   %    #    !               cCs|io|Sg}t}xß|D]×}|i}|djog}t}nŸ|djog}t}q"n|djo t}nh|djo t}q"nN|djo t}n7|djo t}q"n|oq"n|oq"n|i|ƒq"W|d|jo|S|S(s¹ Removes any frames that should be hidden, according to the values of traceback_hide, self.show_hidden_frames, and the hidden status of the final frame. tbeforetbefore_and_thistresettreset_and_thistaftertafter_and_thisiÿÿÿÿ(R tFalsettraceback_hideRR (RRt new_framesthiddenRDthide((s>/usr/lib/python2.6/site-packages/paste/exceptions/formatter.pyR]s@           cCscd|joHt|ƒ}|dd|dd!|dd}|iddƒ}|St|ƒSdS(sa Formats the string as a triple-quoted string when it contains newlines. s iiiiÿÿÿÿs\nN(treprtreplace(RR((s>/usr/lib/python2.6/site-packages/paste/exceptions/formatter.pytpretty_string_repr‰s   %cCsTd}xG|D]?}tt|ƒƒdjo |d7}|djotSq q WtS(su Returns true if the list contains items that are long, and should be more nicely formatted. ii(ii(R0RZRRU(Rtlstthow_manytitem((s>/usr/lib/python2.6/site-packages/paste/exceptions/formatter.pytlong_item_list–s   (( R6t __module__tgeneral_data_orderRURRRNRR\R`(((s>/usr/lib/python2.6/site-packages/paste/exceptions/formatter.pyRs   ? , t TextFormattercBs¡eZd„Zd„Zd„Zd„Zd„Zd„Zd„Zd„Z d„Z d „Z d „Z d „Z d „Zd „Zd„Zd„Zd„ZRS(cCs|S(N((RR((s>/usr/lib/python2.6/site-packages/paste/exceptions/formatter.pytquote¥scCs|S(N((RR((s>/usr/lib/python2.6/site-packages/paste/exceptions/formatter.pyR+§scCs|S(N((RR((s>/usr/lib/python2.6/site-packages/paste/exceptions/formatter.pyt emphasize©scCs d|i|it|ƒƒƒS(Ns In object: %s(ReRdRZ(Rtobj((s>/usr/lib/python2.6/site-packages/paste/exceptions/formatter.pyR«scCsd|i|ƒS(NsURL: %s(Rd(Rturl((s>/usr/lib/python2.6/site-packages/paste/exceptions/formatter.pyR­scCs4|o|id||fƒS|id|ƒSdS(NsLine %i, Column %isLine %i(Re(RRR"((s>/usr/lib/python2.6/site-packages/paste/exceptions/formatter.pyR!¯scCs|id|i|ƒƒS(NsIn expression: %s(ReRd(Rtexpr((s>/usr/lib/python2.6/site-packages/paste/exceptions/formatter.pyR$´scCsd|i|ƒS(Ns Warning: %s(Rd(RRF((s>/usr/lib/python2.6/site-packages/paste/exceptions/formatter.pyR&¶scCs|i|ƒgS(N(R+(RR'((s>/usr/lib/python2.6/site-packages/paste/exceptions/formatter.pyR)¸scCs%d||ipd|ipdfS(NsFile %r, line %s in %sR(tlinenoR>(RR.RD((s>/usr/lib/python2.6/site-packages/paste/exceptions/formatter.pyR1ºscCs |i|ƒS(N(t format_source(RRIRJ((s>/usr/lib/python2.6/site-packages/paste/exceptions/formatter.pyR3½scCsd|i|iƒƒS(Ns (Rdtstrip(Rt source_line((s>/usr/lib/python2.6/site-packages/paste/exceptions/formatter.pyRj¿scCs)|id|i|ƒ|i|ƒfƒS(Ns%s: %s(ReRd(RRKtevalue((s>/usr/lib/python2.6/site-packages/paste/exceptions/formatter.pyR7ÁscCs|S(N((RR'((s>/usr/lib/python2.6/site-packages/paste/exceptions/formatter.pyR-Äsc CsŒg}|dD]\}}||q~|d*|i|ƒx@dD]8}|ig}||D]\}}||q^~ƒqCW|i|ƒS(NRiRRR(snormals supplementalsextra(R R(tformat_combine_lines( RRMRCRLt_[1]tnRBR>t_[2]((s>/usr/lib/python2.6/site-packages/paste/exceptions/formatter.pyR;Çs / 6cCs di|ƒS(Ns (tjoin(RRC((s>/usr/lib/python2.6/site-packages/paste/exceptions/formatter.pyRnÎsc Cst|tƒo=|i|ƒ}d|jod||fSd||fSn?t|tƒo©d|dt|ƒg}|iƒ}|iƒxi|D]a\}}yt|ƒ}Wntj o} d| }nXt |ƒ}|i d||fƒq“Wdi |ƒSt|t t fƒoU|i|ƒoEg} |D]}| t t|ƒƒq7~ } d|di | ƒfSd|t t|ƒƒfSdS( Ns s%s: %ss%s: %st-sCannot display: %ss %s: %ss %s: [ %s]s, (RRR\tdictR0RR:RZt ExceptionttruncateR RrtlistRR`( RR@RARBRRCRRptvteRotparts((s>/usr/lib/python2.6/site-packages/paste/exceptions/formatter.pyRÑs0     -(R6RaRdR+ReRRR!R$R&R)R1R3RjR7R-R;RnR(((s>/usr/lib/python2.6/site-packages/paste/exceptions/formatter.pyRc£s"                t HTMLFormattercBsweZd„Zd„Zd„Zd„Zd„Zd„Zd„Zd„Z d„Z d „Z d „Z d d „Z RS( cCs t|ƒS(N(R(RR((s>/usr/lib/python2.6/site-packages/paste/exceptions/formatter.pyRdîscCsd|i|ƒS(Ns
%s
(Rd(RR((s>/usr/lib/python2.6/site-packages/paste/exceptions/formatter.pyR+ðscCsd|S(Ns %s((RR((s>/usr/lib/python2.6/site-packages/paste/exceptions/formatter.pyReòscCsd||fS(NsURL: %s((RRg((s>/usr/lib/python2.6/site-packages/paste/exceptions/formatter.pyRôscCs di|ƒS(Ns
(Rr(RRC((s>/usr/lib/python2.6/site-packages/paste/exceptions/formatter.pyRnöscCsU|i|ipdƒ}d||ipd|ipd|fSd||i|fS(NRsMModule %s:%s in %ssFile %r, line %s in %s(RdR>tmodnameRi(RR.RDR>((s>/usr/lib/python2.6/site-packages/paste/exceptions/formatter.pyR1øs cCs8t|tdtƒ}t|tdtƒ}d||fS(Niis>>>  %s(tstr2htmlRUR(RRIRJt q_long_sourcetq_source((s>/usr/lib/python2.6/site-packages/paste/exceptions/formatter.pyR3ÿs cCsd|i|iƒƒS(Ns*  %s(RdRk(RRl((s>/usr/lib/python2.6/site-packages/paste/exceptions/formatter.pyRjscCsd|i|ƒS(Ns
%s
(Rd(RR'((s>/usr/lib/python2.6/site-packages/paste/exceptions/formatter.pyR-scCsôt|tƒoO|i|ƒ}d|jod||i|ƒfSd||i|ƒfSn’t|tƒo|i||ƒSt|ttfƒo=|i|ƒo-d|di t |it t |ƒƒƒfSd||it |ƒƒfSdS(Ns s%s:
%s
s%s: %ss$%s: [
    %s]
s,
    ( RRR\RdRtt zebra_tableRwRR`RrtmapRZ(RR@RARBR((s>/usr/lib/python2.6/site-packages/paste/exceptions/formatter.pyR s *c Cs g}|dD]\}}||q~|d*|i|ƒx@d D]8}|ig}||D]\}}||q^~ƒqCW|doT|iddƒ|ig} |dD]\}}| |q°~ ƒ|idƒn|i|ƒ} |io tt| S| SdS( NRiRRRsS s*
s
(snormals supplemental(R R(RnR t error_cssthide_display_js( RRMRCRLRoRpRBR>Rqt_[3]ttext((s>/usr/lib/python2.6/site-packages/paste/exceptions/formatter.pyR;s/ 6 2  t variablesc Cs t|tƒo|iƒ}|iƒnd|d|i|ƒg}t}x¡|D]™\}}yt|ƒ}Wntj o}d|}nX| }|id|odpd|i|ƒfƒ|idt |it |ƒƒƒƒqTW|idƒd i |ƒS( Nss/sCannot print: %sstoddtevenss
%s
%s%s
s ( RRtRR:RdRURZRuR tmake_wrappableRvRr( RRAtrowst table_classttableR‡R>RBRy((s>/usr/lib/python2.6/site-packages/paste/exceptions/formatter.pyR€.s,  %! (R6RaRdR+ReRRnR1R3RjR-RR;R€(((s>/usr/lib/python2.6/site-packages/paste/exceptions/formatter.pyR{ìs           s‡ sh cKsˆ|pt|i|ƒSt|dt|}t|d
%s

(R{RNt format_htmlRURt format_textRR(R<tinclude_hidden_framestopstshort_ertlong_erttext_er((s>/usr/lib/python2.6/site-packages/paste/exceptions/formatter.pyR·s  cKst|i|ƒS(N(RcRN(R<R((s>/usr/lib/python2.6/site-packages/paste/exceptions/formatter.pyRŽÓss +s s

ERROR: .*?

ic Cs5y t|d|d|d|ƒSWnt|ƒSXdS(sˆ Convert a string to HTML. Try to be really safe about it, returning a quoted version of the string if nothing else works. Rktindent_subsequentthighlight_innerN(t _str2htmlR(tsrcRkR”R•((s>/usr/lib/python2.6/site-packages/paste/exceptions/formatter.pyR}Ús  cCsZ|o|iƒ}n|}ygti|ddƒ}tid|ƒ}tid|ƒ}tidd|ƒ}tidd|ƒ}Wnt|ƒ}nX|iƒ}t |ƒdjo |dSd|}xct dt |ƒƒD]L}|||||<|o-|t |ƒd jod ||||%ss
cSsdt|idƒƒddS(s iiR›(R0tgroup(tm((s>/usr/lib/python2.6/site-packages/paste/exceptions/formatter.pytþs( RkRR}terror_retsubtpre_retreRt splitlinesR0trangeRrt whitespace_re(R—RkR”R•torig_srcRCtindentti((s>/usr/lib/python2.6/site-packages/paste/exceptions/formatter.pyR–çs0   iècCs4t|ƒ|jo||d d|dS|SdS(sC Truncate the string to the limit number of characters is...iïÿÿÿN(R0(tstringtlimit((s>/usr/lib/python2.6/site-packages/paste/exceptions/formatter.pyRvsi<s ;?&@!$#-/\"'c Cst|ƒ|jo|S|iƒ}g}xÛ|D]Ó}d}x­t|ƒ|jo™x’|D]H}||jo5|i|dƒ\}} |||d7}| }PqZqZWx9tdt|ƒ|ƒD]} ||| | |!d7}q¿Wd}q@W||7}|i|ƒq1Wdi|ƒS(NRšisiR›(R0tsplitR¤R Rr( thtmlt wrap_limittsplit_ontwordst new_wordstwordt wrapped_wordtchartfirsttrestR¨((s>/usr/lib/python2.6/site-packages/paste/exceptions/formatter.pyR‰ s.     cCs•|iƒ}g}xs|D]k}t|ƒ|joExB|D]6}||jo#|i|ƒ}di|ƒ}Pq9q9Wn|i|ƒqWdi|ƒS(s Like ``make_wrappable()`` but intended for text that will go in a ``
`` block, so wrap on a line-by-line basis.
    ss
(R£R0R«RrR (R¬R­R®RCt	new_linesRR³Rz((s>/usr/lib/python2.6/site-packages/paste/exceptions/formatter.pytmake_pre_wrappable$s

(t__doc__RR¢t
paste.utilRRRRRcR{RƒR‚RURRŽtcompileR¥R¡RŸR}R–RvR‰R·(((s>/usr/lib/python2.6/site-packages/paste/exceptions/formatter.pyts.	’I‘8