Output buffer

Fredrik Lundh fredrik at pythonware.com
Sat Dec 22 17:23:54 EST 2007


Cesar D. Rodas wrote:

> I am newbie in Python, but I like it very much.
> 
> Right now I am having a problem, I am working with mod_python in apache. 
> What I needing is a stdout buffering, that means that everything that I 
> send to stdout keep it in a variable, then flush it and clear.

plug in a StringIO instance on sys.stdout, or use (or adapt) a library 
designed for this purpose:

    http://www.mnot.net/cgi_buffer/

</F>




More information about the Python-list mailing list