Basically what I'm looking to do is to have python code that I can run from cmd that opens a new cmd window then types commands into it. I have been able to open and run commands but the commands always run in the first cmd window. I think I might need to switch the cursor or something like that, but I don't know how. Here is my current code. import subprocess
subprocess.call('start', shell=True)
import time time.sleep(5)
cmd=['', ''] ### In the second '' you can type in cmd. for each in cmd:
process=subprocess.Popen(each,stdout=subprocess.PIPE,shell=True)
output=process.communicate()[0]
print(output.decode('utf-8'))
- Thanks
EDIT :
NVM Its in the similar one