Launching a subprocess without waiting around for the result?

Michael Palmer m_palmer45 at
Sat Sep 20 00:37:01 CEST 2008

On Sep 18, 5:33 pm, erikcw <erikwickst... at> wrote:
> Hi,
> 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.
> What is the correct way to launch subprocess without waiting for the
> result to return?
> Thanks!

both os.spawn or subprocess can be used. I actually find subprocess
hard to remember so usually prefer os.spawn. For various examples and
explanations, see

More information about the Python-list mailing list