How to redirect output to browser

A printers at sendme.cz
Sat Jul 27 10:51:25 EDT 2002


Hi,
Is it possible to send output continuously to a web browser?. 
For example I have the following code
>>> import httplib
>>> h = httplib.HTTP('www.cwi.nl')
>>> h.putrequest('GET', '/index.html')
>>> h.putheader('Accept', 'text/html')
>>> h.putheader('Accept', 'text/plain')
>>> h.endheaders()
I would like to send coming bytes ( here coming bytes of 
/index.html file)  directly to web browser in the same 
way as I use a web browser on my computer to open a 
webpage where I can see a progress how webpage is being 
opened.
In other words I do NOT want to wait for downloading the 
whole file and only after that open that downloaded file 
in a web browser. 

Thank you for help
Ladislav





More information about the Python-list mailing list