[Web-SIG] Emulating req.write() in WSGI

Gustavo Narea me at gustavonarea.net
Mon Jun 28 21:50:35 CEST 2010


http://pythonpaste.org/waitforit/

HTH.

 - Gustavo.

Aaron said:
> One of the nice things about mod_python is the req.write() function.
> 
> Although I realize it's somewhat of an abuse to the http protocol, it's
> handy being able to periodically update the client browser with a status
> message for a long-running job.
> 
> So handy in fact that I have a number of applications that rely fairly
> heavily on it as a means of keeping the client (person) happy instead of
> just showing them the default "browser busy" notification.
> 
> There are a couple of workarounds, neither of which are ideal:
> 1. Take them immediately to a secondary page, then submit the actual job
> automatically on that second page.
> 2. Instead of using HTTP POST, use an HTTP Request Object (ie. Ajax).
> 
> Both of them involve significantly more development effort than an
> equivalent req.write().
> 
> Is there a way to emulate the periodic-write functionality in WSGI?
-- 
Gustavo Narea <xri://=Gustavo>.
| Tech blog: =Gustavo/(+blog)/tech  ~  About me: =Gustavo/about |


More information about the Web-SIG mailing list