Ñò ô†³Kc @s©dZddklZddkZddkZddklZddklZddkl Z ddk Z e a dgZ defd „ƒYZdefd „ƒYZdS( s Middleware that displays everything that is printed inline in application pages. Anything printed during the request will get captured and included on the page. It will usually be included as a floating element in the top right hand corner of the page. If you want to override this you can include a tag in your template where it will be placed::


You might want to include ``style="white-space: normal"``, as all the
whitespace will be quoted, and this allows the text to wrap if
necessary.

iÿÿÿÿ(tStringION(t
threadedprint(twsgilib(tresponsetPrintDebugMiddlewaretTeeFilecBseZd„Zd„ZRS(cCs
||_dS(N(tfiles(tselfR((s6/usr/lib/python2.6/site-packages/paste/debug/prints.pyt__init__"scCsEt|tƒot|ƒ}nx|iD]}|i|ƒq*WdS(N(t
isinstancetunicodetstrRtwrite(Rtvtfile((s6/usr/lib/python2.6/site-packages/paste/debug/prints.pyR%s

(t__name__t
__module__RR(((s6/usr/lib/python2.6/site-packages/paste/debug/prints.pyR s	cBsleZdZdZdeeed„Zd„Ze	i
de	iƒZe	i
de	ie	i
ƒZd„ZRS(sL
    This middleware captures all the printed statements, and inlines
    them in HTML pages, so that you can see all the (debug-intended)
    print statements in the page itself.

    There are two keys added to the environment to control this:
    ``environ['paste.printdebug_listeners']`` is a list of functions
    that will be called everytime something is printed.

    ``environ['paste.remove_printdebug']`` is a function that, if
    called, will disable printing of output for that request.

    If you have ``replace_stdout=True`` then stdout is replaced, not
    captured.
    s¿
Log messages
%s
cCsa||_||_t|tƒo ddkl}||ƒ}n||_||_d|_ dS(Niÿÿÿÿ(tasbool( tapptforce_content_typeR t basestringtpaste.deploy.convertersRtprint_wsgi_errorstreplace_stdouttNonet_threaded_print_stdout(RRt global_confRRRR((s6/usr/lib/python2.6/site-packages/paste/debug/prints.pyRDs    c s|idƒo|i||ƒSt p|itij o*tatid|i ƒti|_ng‰‡fd†}||d]*>s']*id="paste-debug-prints".*?>cCs¯|p|Sti|ƒ}|iddƒ}|iddƒ}|ii|ƒ}|p#|i|}|ii|ƒ}n|p ||S||iƒ |||iƒSdS(Ns s
s s  (tcgitescapetreplacet _explicit_retsearcht log_templatet_body_retend(Rthtmltlogttexttmatch((s6/usr/lib/python2.6/site-packages/paste/debug/prints.pyR+‡s  N(RRt__doc__R<RtFalseR#RR6tretcompiletIR=tSR:R+(((s6/usr/lib/python2.6/site-packages/paste/debug/prints.pyR,s 2 (RCt cStringIORRER7t paste.utilRtpasteRRR!RDR t__all__tobjectRR(((s6/usr/lib/python2.6/site-packages/paste/debug/prints.pyts