def launchWithoutCo nsole(command, args):
"""Launches 'command' windowless and waits until finished"""
startupinfo = subprocess.STAR TUPINFO()
startupinfo.dwF lags |= subprocess.STAR TF_USESHOWWINDO W
return subprocess.Pope n([command] + args,
startupinfo=sta rtupinfo).wait( )
handle = launchWithoutCo nsole("program. exe",["disconnect "])
------------------------------------------------------------------------------------------------------------------------------
I've been searching for ways to terminate this process so I can exit my
program. program.exe is a text based interface which I'm running with
python subprocess in a DOS command window. I tried using 'sys.exit()'
to end my program, but nothing works. I think I have to somehow
terminate the subprocesses I create. Any suggestions?
"""Launches 'command' windowless and waits until finished"""
startupinfo = subprocess.STAR TUPINFO()
startupinfo.dwF lags |= subprocess.STAR TF_USESHOWWINDO W
return subprocess.Pope n([command] + args,
startupinfo=sta rtupinfo).wait( )
handle = launchWithoutCo nsole("program. exe",["disconnect "])
------------------------------------------------------------------------------------------------------------------------------
I've been searching for ways to terminate this process so I can exit my
program. program.exe is a text based interface which I'm running with
python subprocess in a DOS command window. I tried using 'sys.exit()'
to end my program, but nothing works. I think I have to somehow
terminate the subprocesses I create. Any suggestions?