Yong Wang wrote:
> Hi, All:
>     I have written a python CGI script to run in html web page. When I access 
> to
> the html page, it only runs part of the script, then abort because the late 
> part of
> the script is involved in database access, it is slow. I wonder whether there 
> is 
> a way to control html running speed so that it can wait for CGI script to 
> complete
> execution, then write the results to html page ? 
>     Thanks a lot .
>
>       Yong
>
>   
Yong,

Are you reffering to your browser connection to web server timing out 
waiting for query to complete?

I had some long running scripts that would do that so I used a timer 
thread to print comments to the browser  IE: <!-- keep alive -->.  Brute 
force approach but it worked using IE with apache.  If I remember right 
you have to call sys.stdout.flush() to force the write over socket to 
happen right away. 

Tim


-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to