I just added a tutorial to the cookbook showing how to use yield to serve
out large content or perhaps do long polling.  The simple example uses
time.sleep to simulate some long process.  You'll find that it does sleep
correctly and delay spitting out content if you use telnet.  It is flushing
the content.

If you have problems getting it to show up you need to play with the web
headers.  Transfer-Encoding "chunked".   If your browser doesn't support it
then it may buffer the content and instead of incremental download you'll
see a large delay then the whole page.

I've only tested this with the CherryPy server.  I don't know if it works
with others.

http://webpy.org/cookbook/streaming_large_files


Comments and feedback appreciated.

Thanks,

Russ Ryba

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"web.py" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [email protected]
For more options, visit this group at http://groups.google.com/group/webpy?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to