[mod_python] _req.write buffer/flush question

Chris Hagner chagner at yahoo.com
Fri Mar 25 15:50:20 EST 2005


Hi there,

I am trying to figure out some strangeness that I'm
observing when having > 1 _req.write() statements.  I
use a templating system, os my first call to
_req.write() gets the output of rendered HTML
template.  The second call is used when I turn on my
own internal debugging which dumps more information to
the browser (thus simplifying tracking down values and
settings).  This all worked fine under modpy 2.x but
I'm noticing that in 3.1 only a fraction of the second
call of _req.write() is showing up in the browser.

Initially, the second output didn't appear at all
until I turned off 'flush' when calling _req.write(). 
This was due to my framework being originally written
for modpy 2.x.  Now second output appears, but only a
fraction of it.  It appears to drop output after a
certain length.  Basically, when I try to write too
long string through the second _req.write() call, it
gets truncated (at least in mozilla).  In konqueror,
the second output doesn't appear at all.  Grrr.

Oh yeah, I did try various combinations of flushing or
telling the write to flush, but there was no real
improvement.

I haven't really kept up with the latest changes in
3.x, but there didn't seem to be anything in the docs
or in the mailing list.

Thanks for your help!

Chris



		
__________________________________ 
Do you Yahoo!? 
Yahoo! Small Business - Try our new resources site!
http://smallbusiness.yahoo.com/resources/ 


More information about the Mod_python mailing list