python-subprocess

1.idle = subprocess.Popen('C:\Python36\pythonw.exe "C:\Python36\Lib\idlelib\idle.pyw"')#启动应用程序

    返回值时一个Popen对象

2.idle.poll()#判断打开的程序是否正在运行,若正在运行,返回None,若无错停止,返回0,有错终止,返回1

3.idle.wait()#等待启动的进程终止

猜你喜欢

转载自blog.csdn.net/qq_41484460/article/details/80242025