osx是否安装了iterm2 2015/09/21 15485 #/usr/bin/env python3 #coding: utf-8 import os def get_tools(): apppath="/Applications" tools = ['termal'] for i in os.listdir(apppath): if i.startswith("iTerm.app"): tools.append("iterm2") break return tools print(get_tools())