[SciPy-User] Parallel processing

Pauli Virtanen pav at iki.fi
Fri Mar 4 10:31:17 EST 2011


Fri, 04 Mar 2011 16:19:07 +0100, Nils Wagner wrote:
[clip]
> I would like to parallelize a number of calls to mycmd
> 
> nproc denotes the number of processes .
> 
> for i in range(nproc):
> 
>      try:
>          retcode = call("mycmd" + " myarg", shell=True) if retcode < 0:
>              print >>sys.stderr, "Child was terminated by
[clip]
> How can I manage that with python ?

For example, use `subprocess.Popen` to spawn the processes to the 
background.

-- 
Pauli Virtanen




More information about the SciPy-User mailing list