run subprocesses in parallel

2010-08-02 Thread Santiago Caracol
Hello, I want to run several subprocesses. Like so: p1 = Popen(mycmd1 + myarg, shell=True) p2 = Popen(mycmd2 + myarg, shell=True) ... pn = Popen(mycmdn + myarg, shell=True) What would be the most elegant and secure way to run all n subprocesses in parallel? Santiago --

Re: run subprocesses in parallel

2010-08-02 Thread Christian Heimes
I want to run several subprocesses. Like so: p1 = Popen(mycmd1 + myarg, shell=True) p2 = Popen(mycmd2 + myarg, shell=True) pn = Popen(mycmdn + myarg, shell=True) What would be the most elegant and secure way to run all n subprocesses in parallel? They already run in parallel.

Re: run subprocesses in parallel

2010-08-02 Thread Nobody
On Mon, 02 Aug 2010 14:21:38 +0200, Christian Heimes wrote: You might want to drop shell=True and use a list as arguments instead. The two issues (whether shell is True/False and whether the command is a list or string) are orthogonal. You should always use a list for the command, unless you