CGI script running not completely in HTML
Tim
tim at zoominternet.net
Thu Aug 17 16:24:41 EDT 2006
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
More information about the Python-list
mailing list