Newbie question...

Christian Tellefsen christian.tellefsen at electricfarm.no
Fri May 21 07:48:12 EDT 1999


... I just started programming in Python (today!)

I want to run a few OS commands from python (on Win NT),
but I cannot find a way to wait for the commands to finish.

Source:
**
os.system ('c:\ntreskit\sc stop "' + serviceA + '"')
os.system ('c:\ntreskit\sc stop "' + serviceB + '"')
os.system ('c:\ntreskit\sc stop "' + serviceC + '"')
**

Is there a way I can ensure that each command finishes before the next line
in the script is executed?

Sorry if this has been asked before!

Yours,
Christian Tellefsen
(christian.tellefsen at electricfarm.no)







More information about the Python-list mailing list