005 python 打开windows下的软件,python打开记事本 subprocess
如果要用python代码打开windos上的记事本,代码如下:
import subprocess
notePro = subprocess.Popen('notepad.exe')
print(notePro)
如果要打开别的软件,则把notepad.exe 换成想要打开的软件即可。记得把exe所在目录加到环境变量path中。
如果要用python代码打开windos上的记事本,代码如下:
import subprocess
notePro = subprocess.Popen('notepad.exe')
print(notePro)
如果要打开别的软件,则把notepad.exe 换成想要打开的软件即可。记得把exe所在目录加到环境变量path中。