os.exec?

John W. Baxter jwbnews at scandaroon.com
Mon Dec 25 19:53:26 CET 2000


In article <mailman.977727428.19738.python-list at python.org>, Moshe 
Zadka <moshez at zadka.site.co.il> wrote:

> On Mon, 25 Dec 2000, "deadmeat" <root@[127.0.0.1]> wrote:
> 
> > How to I execute an external program without replacing the Python
> > interpreter? I want control to return to Python when the external 
> > program is
> > completed. I still want stdio to go to the console not to a pipe if
> > possible.
> 
> Quite possibly, you'd want os.system, and os.popen.
> Or, you might want to work on a lower level with os.fork/os.exec/os.open.

Or, moving to a higher level, there is the commands module, which wraps 
those things mentioned above.  I tend to be lazy and use that.

   --John

-- 
John W. Baxter   Port Ludlow, WA USA  jwbnews at scandaroon.com



More information about the Python-list mailing list