重复编辑:不,我这样做但它不想启动Firefox.我正在做一个cortana/siri助手的事情,我想让它说我在说些什么时打开一个网页浏览器.所以我已经完成了if部分,但我只是需要它来启动firefox.exe我尝试了不同的东西,我得到一个错误.这是代码.请帮忙!它适用于打开记事本,但不适用于Firefox.
#subprocess.Popen(['C:\Program Files\Mozilla Firefox\firefox.exe']) opens the app and continues the script
#subprocess.call(['C:\Program Files\Mozilla Firefox\firefox.exe']) this opens it but doesnt continue the script
import os
import subprocess
print "Hello, I am Danbot.. If you are new ask for help!" #intro
prompt = ">" #sets the bit that indicates to input to >
input = raw_input (prompt) #sets whatever you say to the input so bot can proces
raw_input (prompt) #makes an input
if input == "help": #if the input is that …Run Code Online (Sandbox Code Playgroud)