[Tutor] system call
Alan Gauld
alan.gauld at btinternet.com
Sun Oct 28 01:09:35 CEST 2007
"Eric Walker" <sli1que at yahoo.com> wrote
> I am trying to run a timing script but I need the python program
> to stop and wait for the executable to finish. Does anyone have
> any examples of doing this?
There are several ways to do it depending on what exactly
you are trying to do. We need a bit more detail.
If the "timing script" is an externalo program then if you run
it using os.system() your code will wait(ie block) until system()
returms - which is when the program executed exits.
However os.system() is a bit of a blunt tool and
often not the best solution. If we know what the
real problem is we might do better.
--
Alan Gauld
Author of the Learn to Program web site
http://www.freenetpages.co.uk/hp/alan.gauld
More information about the Tutor
mailing list