Keep a python script running after browser window closed
Mike Driscoll
kyosohma at gmail.com
Fri Mar 7 11:33:59 EST 2008
On Mar 7, 10:28 am, sophie_newbie <paulgeele... at gmail.com> wrote:
> Hi,
>
> I have a cgi script that performs a very long computation that can
> take several hours to complete. Is there any smart way that I can keep
> this script running until it is finished (after the user has closed
> the browser) and email them with the results. The email bit isn't the
> problem, I just don't know how to keep the code running in the
> background. I'm sure there is a smart way to do this...
>
> Thanks!
You might have your cgi script use the subprocess module to open a
second script that does the long-running process.
Mike
More information about the Python-list
mailing list