Python and CGI

Paul Boddie paulb at infercor.no
Tue Aug 15 06:55:26 EDT 2000


Drew Fisher wrote:
> 
> Hello,
> 
> I think this may be more of a CGI question, but I'm not too sure where
> else to go.
> 
> I have a python script that takes a long time to run and my
> Pointy-Haired Boss wants it to be a webpage.
> 
> Since the script takes longer than the Timeout parameter allows, I need
> to find a way to flush some of the data to the web page before the
> CGI script gets finished.

What kind of data is it presenting? How interactive are the criteria for
specifying the appearance or nature of the data? How long does the script take
to run? Is it important that the page reflects the data at the exact time the
page is visited?

If the data is, for example, a snapshot of something over which a user has
little control, and if this snapshot takes a long time to produce but need not
reflect the state of a system at a user-defined moment in time, then you could
have a job running which periodically updates a static page which is then
visited by interested parties. You would just need to make sure that your script
produces a working copy of the page which is only swapped with the viewable page
when the working copy is complete.

Regards,

Paul



More information about the Python-list mailing list