<div dir="ltr"><div><font face="verdana,sans-serif">Hello all,</font></div>
<div><font face="verdana,sans-serif"></font> </div>
<div><font face="verdana,sans-serif">I wrote the following code:</font></div>
<div><font face="courier new,monospace"></font> </div>
<div><font style="BACKGROUND-COLOR: #ffffff" face="courier new,monospace" color="#3366ff">import subprocess,time<br>cmdExe = "C:\\WINDOWS\\system32\\cmd.exe"<br>myProcess = subprocess.Popen(cmdExe,stdin=subprocess.PIPE)<br>
time.sleep(2)<br>myProcess.stdin.write('cd Desktop\r\n')</font></div>
<div><font face="courier new,monospace" color="#3366ff"></font> </div>
<div><font face="verdana,sans-serif" color="#000000">I copied the above lines of code to a file and tried executing the python file from dos box (command prompt) on windows</font></div>
<div><font face="verdana,sans-serif" color="#000000">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?</font></div>
<div><font face="verdana,sans-serif" color="#000000"></font> </div>
<div><font face="verdana,sans-serif" color="#000000">Thanks & Regards.</font></div>
<div><font face="verdana,sans-serif" color="#000000">Tarun</font></div></div>