Ñò ô†³Kc @ s© d Z d d k l Z d d k Z d d k Z d d k l Z d d k l Z d d k l Z d d k Z e a d g Z d e f d „ ƒ YZ d e f d „ ƒ YZ d S( 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ÿÿÿÿ( t StringION( t threadedprint( t wsgilib( t responset PrintDebugMiddlewaret TeeFilec B s e Z d „ Z d „ Z RS( c C s | | _ d S( N( t files( t selfR ( ( s6 /usr/lib/python2.6/site-packages/paste/debug/prints.pyt __init__" s c C sE t | t ƒ o t | ƒ } n x | i D] } | i | ƒ q* Wd S( N( t isinstancet unicodet strR t write( R t vt file( ( s6 /usr/lib/python2.6/site-packages/paste/debug/prints.pyR % s ( t __name__t __module__R R ( ( ( s6 /usr/lib/python2.6/site-packages/paste/debug/prints.pyR s c B sl e Z d Z d Z d e e e d „ Z d „ Z e i d e i ƒ Z e i d e i e i ƒ Z d „ Z RS( 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 messagesc C sa | | _ | | _ t | t ƒ o d d k l } | | ƒ } n | | _ | | _ d | _ d S( Niÿÿÿÿ( t asbool( t appt force_content_typeR t basestringt paste.deploy.convertersR t print_wsgi_errorst replace_stdoutt Nonet _threaded_print_stdout( R R t global_confR R R R ( ( s6 /usr/lib/python2.6/site-packages/paste/debug/prints.pyR D s c s | i d ƒ o | i | | ƒ St p | i t i j o* t a t i d | i ƒ t i | _ n g ‰ ‡ f d † } | | d
%s