I tried the below approach to open a command prompt and run a sample command. But it immediately closes:
import os
# as of now i am just passing cd /../, later will be changing to a different command
os.system("start /wait cmd /c {cd /../}")
I also tried this way, but this opens two command shells:
import os
os.system("start /B start cmd.exe @cmd /k cd /d D:")
Is it possible to just open one command prompt and run the command?