calling a program without waiting for it to finish

Brian Munroe bmunroe at tribador.nu
Thu Mar 20 12:07:42 EST 2003


> the shell interactively, only, of course!-) as soon as it's done
> setting things up, so the pipeline runs in separate processes.
> 
> os.system delegates the whole operation to the system shell (normally
> sh) so the above information should be directly applicable...
> 

So if you enter os.system('ping blah.com &') it will basically shell out
to the os and run the ping command in the background?  If you use ping
without a -n option (atleast on the machine I am on) it will continue
to ping forever (or until ^C)

So, do you know if this process terminates when the python script
finishes, or will it continue to run in the background?  If it continues
to run, this could cause problems.

I would try it, but I don't have access to a python interpeter at the
moment.

-- brian






More information about the Python-list mailing list