Home > Enterprise >  Run CMD command in python script in ANOTHER Shell
Run CMD command in python script in ANOTHER Shell

Time:09-30

I am running a pogram "xxx" in the windows cmd shell. With a python script I want to check whether this specific process "xxx" is frozen or not. If so, it should reopen the process with

os.system(r'xxx.bat')

but then the python script does no check anymore because its running the process...

How can I open another, standalone CMD Terminal so that the python script starts checking again immediately after opening the shell?

CodePudding user response:

  1. you have to first click one your cmd...it opens next
  2. you have to click second time your cmd then it open second window ....

CodePudding user response:

simple solution: os.startfile(xxx.bat)

keyword: non-blocking

  • Related