osx是否安装了iterm2

清华大佬耗费三个月吐血整理的几百G的资源,免费分享!....>>>

#/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())