How to "shell out"?

Trent Mick trentm at activestate.com
Thu May 25 14:57:24 EDT 2000


> Is there a library function in Python which lets it really shell out
> to a new process, giving the new process complete control over the
> terminal, and putting itself on hold until the process completes?

Just use os.system() to launch your shell.


Python 1.5.2 (#0, Apr 13 1999, 10:51:12) [MSC 32 bit (Intel)] on win32
Copyright 1991-1995 Stichting Mathematisch Centrum, Amsterdam
>>> import os
>>> os.system('cmd.exe')
Microsoft(R) Windows NT(TM)
(C) Copyright 1985-1996 Microsoft Corp.

C:\>echo hello
hello

C:\>exit
9009
>>>
>>>
>>>




-- 
Trent Mick
trentm at activestate.com




More information about the Python-list mailing list