open a shell prompt froma python program

Derek Martin code at pizzashack.org
Thu Oct 30 18:47:16 EDT 2008


On Thu, Oct 30, 2008 at 02:47:48AM -0700, gaurav kashyap wrote:
> Simply i want to open a shell prompt from a python program.

If this is literally true, then you just need to figure out what
command will open a terminal window from the shell prompt.  Once you
figure that out, it's as simple as:

cmd = "whatever your shell command is"
os.system(cmd)

-- 
Derek D. Martin
http://www.pizzashack.org/
GPG Key ID: 0x81CFE75D

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 196 bytes
Desc: not available
URL: <http://mail.python.org/pipermail/python-list/attachments/20081030/8da01f71/attachment-0001.sig>


More information about the Python-list mailing list