Regarding subprocess module

tarun tarundevnani at gmail.com
Fri Sep 5 08:56:02 EDT 2008


Hello all,

I wrote the following code:

import subprocess,time
cmdExe = "C:\\WINDOWS\\system32\\cmd.exe"
myProcess = subprocess.Popen(cmdExe,stdin=subprocess.PIPE)
time.sleep(2)
myProcess.stdin.write('cd Desktop\r\n')

I copied the above lines of code to a file and tried executing the python
file from dos box (command prompt) on windows
I want subprocess.Popen to open a new dos box. But it works in the same
window. What should I do to open the subprocess in new window?

Thanks & Regards.
Tarun
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20080905/827b9237/attachment.html>


More information about the Python-list mailing list