problem

Maarten van Reeuwijk maarten at remove_this_ws.tn.tudelft.nl
Tue Mar 9 11:26:32 EST 2004


ciccio at unical.it wrote:

> Hi
> I have a big probel. I'm using a script to run sequencially 5 programs,
> but just one of them runs before the next. Can you help me to solve this
> problem? many thanks
> ernesto

Are these processes that fork off a child process? The following example
waits nicely, as you would expect.

import os
os.system("read")
os.system("echo 'writing in shell!'")

And this one doesn't:

import os
os.system("read &")
os.system("echo 'writing in shell!'")

system executes the string in a subshell. If the command runs in the
background, the subshell finishes and also kills the subprocess.

HTH, Maarten



-- 
===================================================================
Maarten van Reeuwijk                    Thermal and Fluids Sciences
Phd student                             dept. of Multiscale Physics
www.ws.tn.tudelft.nl                 Delft University of Technology



More information about the Python-list mailing list