python - Subprocess.Popen not terminating when calling cmd-file calling powershell-file -


i'm trying call windows-cmd-file python's subprocess.popen module. script calls powershell file contains problem logic. call works fine , script executed, anyway not seem terminate. logic current code following:

prun = subprocess.popen([r'c:\runps.cmd', 'c:\psfile.ps1', 'arg2'], shell=false)  prun.wait() ... rest of code 

so far not interested in interaction script (like stdin or stdout), want call script , know when terminated.

when i call same command (c:\runpw.cmd c:\psfile.ps1 arg2) from windows command line works fine, doing desired actions , terminates s.t. can input next command. that's why assume python might wait forever termination of process or thread, won't terminate.

thanks in advance!

post edit: code executed on windows machine


Comments