On Sep 18, 3:33 pm, Ben Finney <[EMAIL PROTECTED]>
wrote:
> erikcw <[EMAIL PROTECTED]> writes:
> > I have a cgi script where users are uploading large files for
> > processing. I want to launch a subprocess to process the file so the
> > user doesn't have to wait for the page to load.
>
> For "how do I deal with subprocesses from Python", the (new in Python
> 2.4) 'subprocess' module is the default go-to answer
> <URL:http://www.python.org/doc/lib/module-subprocess>, replacing a
> rather fragmented set of modules before it.
>
> > What is the correct way to launch subprocess without waiting for the
> > result to return?
>
> Creating an instance of 'subprocess.Popen' will launch the process and
> return the Popen instance. You then have the option of polling it or
> waiting for it to complete.
>
> --
>  \     “To stay young requires unceasing cultivation of the ability to |
>   `\                   unlearn old falsehoods.” —Robert Anson Heinlein |
> _o__)                                                                  |
> Ben Finney

So if I create a Popen object and then just ignore the object and exit
the program the subproccess will finish it's work and then exit itself
cleanly?
--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to