I am trying to open a new command prompt and resume in my desktop app (my app has an "open command prompt here" button). But I cant get it to work: Either the execution of my app halts until I close the command window or the command window just pipes and nothing is shown. This some of what I've tried:
# does nothing, just the execution halts
process = subprocess.run(['cmd.exe'], stdout=subprocess.PIPE, stderr=subprocess.PIPE)
# Opens the cmd prompt, but execution halts until I close it.
process = subprocess.run(['start'], stdout=subprocess.PIPE, stderr=subprocess.PIPE, shell=True)
So how to do this with the subprocess module? I don't want to use legacy functions, the doc states, that I should use this module instead of os.system and os.spawn* (I'm using Python 3.5)