def launchWithoutConsole(command, args): """Launches 'command' windowless and waits until finished""" startupinfo = subprocess.STARTUPINFO() startupinfo.dwFlags |= subprocess.STARTF_USESHOWWINDOW return subprocess.Popen([command] + args, startupinfo=startupinfo).wait()
handle = launchWithoutConsole("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? -- http://mail.python.org/mailman/listinfo/python-list