# 这 3 行代码都能执行成功,为什么不需要路径。
notepad_pipe = subprocess.Popen(['NOTEPAD', txtPath])
# notepad_pipe = subprocess.Popen(['notepad.exe', txtPath])
# notepad_pipe = subprocess.Popen(["C:\WINDOWS\system32\notepad.exe", txtPath])
我好像有点眉目了,这 3 行代码也能执行成功,貌似 C:\WINDOWS\system32\下面的可执行文件都可以这么用
notepad_pipe = subprocess.Popen(['MSPAINT', jpgPath])
# notepad_pipe = subprocess.Popen(['mspaint', jpgPath])
# notepad_pipe = subprocess.Popen(['mspaint.exe', jpgPath])
求大神给个最终答案
notepad_pipe = subprocess.Popen(['NOTEPAD', txtPath])
# notepad_pipe = subprocess.Popen(['notepad.exe', txtPath])
# notepad_pipe = subprocess.Popen(["C:\WINDOWS\system32\notepad.exe", txtPath])
我好像有点眉目了,这 3 行代码也能执行成功,貌似 C:\WINDOWS\system32\下面的可执行文件都可以这么用
notepad_pipe = subprocess.Popen(['MSPAINT', jpgPath])
# notepad_pipe = subprocess.Popen(['mspaint', jpgPath])
# notepad_pipe = subprocess.Popen(['mspaint.exe', jpgPath])
求大神给个最终答案