calling a program without waiting for it to finish

Steve Holden sholden at holdenweb.com
Mon Mar 17 14:55:15 CET 2003


"mnietz" <okumee at compuserve.de> wrote ...
> Hey Guys,
>
> I looking for a way to execute a command-line programm from Pyhton
> without having to wait for it to finish.
> AFAIK i can't use os.popen() or os.system() because these methods wait
> for a return-value. Or can I use the unix command exec in way like
> start in windows os.system("start ping -t www.google.com")?
> That does exactly what i need.
>

You need to look at os.fork and os.spawn* and choose the method that suits
you best.

regards
--
Steve Holden                                  http://www.holdenweb.com/
Python Web Programming                 http://pydish.holdenweb.com/pwp/
Register for PyCon now!            http://www.python.org/pycon/reg.html







More information about the Python-list mailing list