Possible to make subprocess.Popen jobs run serially rather than in parallel?
Jean-Michel Pichavant
jeanmichel at sequans.com
Wed Jun 16 10:45:03 EDT 2010
Chris Seberino wrote:
> On Jun 15, 2:03 pm, Stephen Hansen <me+list/pyt... at ixokai.io> wrote:
>
>
>> Just call "process.wait()" after you call process = subprocess.Popen(...)
>>
>
> I may have not been clear.....
> I *don't* want web app to block on Popen.wait.
> I *do* want the Popen process to run in the background which web app
> still runs doing other things.
>
> Rather, I don't want *MANY* Popen processes to run in the
> background....just one preferably.
>
> cs
>
then put the process.wait() in a single thread, this thread will chain
Popen calls in the background.
If your executing python code in your Popen close, you'd better go for
the multiprocessing module (python 2.6+)
JM
More information about the Python-list
mailing list