发布网友
共1个回答
热心网友
可以不用这个Python 自带的ide,idle。
建议使用:sublime text, atom ,pycharm等
python 认为你的代码调用了相关图形接口,于是出现了这个 rocketship.
方法一:可以去 /System/Library/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/ 修改 Info.plist, 参考 Stopping the Python rocketship icon,里面还大致介绍了原理。该方法比较复杂,未测试。
方法二:添加如下 python code:
import AppKit
info = AppKit.NSBundle.mainBundle().infoDictionary()
info["LSBackgroundOnly"] = "1"
亲测可用。参考 c++ - Start a GUI process in Mac OS X without dock icon
PS:使用中文关键字搜索不到,只搜到这篇知乎,于是用 python hide dock Google 之才找到。