【发布时间】:2011-09-20 11:20:24
【问题描述】:
我找到了一些文章甚至堆栈|溢出问题解决了这个问题,但我仍然做不到..
我想做的是从python打开一个firefox实例。那么python应用就应该管好自己的事,忽略firefox进程。
我能够在 Windows-7 和 XP 上使用:
subprocess.Popen()
在 OS X 上我试过:
subprocess.Popen(['/Applications/Firefox.app/Contents/MacOS/firefox-bin'])
subprocess.call(['/Applications/Firefox.app/Contents/MacOS/firefox-bin'])
subprocess.call(['/Applications/Firefox.app/Contents/MacOS/firefox-bin'], shell=True)
os.system('/Applications/Firefox.app/Contents/MacOS/firefox-bin')
(可能还有一些我忘记了)无济于事。我的 python 应用程序冻结,直到我关闭 firefox 应用程序。
我在这里缺少什么?有什么线索吗?
【问题讨论】:
-
这个以前的答案对我有用:stackoverflow.com/questions/832331/…
-
Firefox 只是这种情况下的一个例子(这就是它不在标题或标签中的原因)。我的进程需要能够打开任何其他进程。
标签: python macos subprocess nonblocking