Newbie help for using multiprocessing and subprocess packages for creating child processes

Piet van Oostrum piet at
Tue Jun 16 17:20:05 EDT 2009

>>>>> Matt <HellZFury+Python at> (M) wrote:

>M> Try replacing:
>M>     cmd = [ "ls /path/to/file/"+staname+"" ]
>M> with:
>M>     cmd = [ “ls”, “/path/to/file/"+staname+"" ]

In addition I would like to remark that -- if the only thing you want to
do is to start up a new command with subprocess.Popen -- the use of the
multiprocessing package is overkill. You could use threads as well.

Moreover, if you don't expect any output from these processes and don't
supply input to them through pipes there isn't even a need for these
threads. You could just use os.wait() to wait for a child to finish and
then start a new process if necessary.
Piet van Oostrum <piet at>
URL: [PGP 8DAE142BE17999C4]
Private email: piet at

More information about the Python-list mailing list