Python Subprocess module commandline program

I'm trying to start a .exe program that is based on command line. The process starts but after 2 seconds, it just vanishes from the task manager. But, when I try to start a .exe that is a GUI, for example firefox.exe, then the application normally opens.

Support Info:After experimenting, opening the cmd.exe with Popen with stdin=subprocess.PIPE and stdout=subprocess.PIPE, I can communicate with the cmd in realtime.But executing an .exe through strdin(writing process.stdin.write("something.exen"), the behavior is the same with the previous paragraph.Like the child process is not given the cmd to execute.

Thanks

链接地址: http://www.djcxy.com/p/13486.html

上一篇: 在python中执行命令行程序

下一篇: Python子进程模块命令行程序