[Tutor] Runing an external command?

alan.gauld@bt.com alan.gauld@bt.com
Thu, 10 Oct 2002 17:13:48 +0100


> My intention, initially at least, is to "shell out" and call 
> the DOS ping
> So my question is how do I run an external program and does 
> the program wait until that program has finished execution 

os.system()

OR 

os.popen()

Basically the second allows you to read the output of the 
program - which might be handy for a ping!
Read the os module docs for the details.

Alan g.
Author of the 'Learning to Program' web site
http://www.freenetpages.co.uk/hp/alan.gauld