os.execl problem on winnt

marc cheatham marcc at yieldworks.com
Sun Oct 29 01:34:25 EDT 2000


That just what I was looking for, thanks for the info.

Marc

Syver Enstad wrote:

> > What I want to be able to do is have Python start a external program and
> > wait until that program is finished before it continues.
>
> Use the os.system call for the easiest way of obtaining what you want. The
> documentation says that the exec functions
> replace the process that calls exec.. with the new process, I guess that's
> why you're having troubles.
>
> As long as you just want to run a program and wait for it to finish,
> os.system will do fine, it searches the path for the process which is often
> nice. If you want to do something else while the other process is running
> you'll have to use the spawn functions if you're going to stay in the python
> std library. The trouble with the spawn.. functions is that they don't
> search the path, so under win32 you can use winexec or shellexecute if you
> want to do that.




More information about the Python-list mailing list