如何通过python,很优雅的启动和关闭mac系统上的某个程序,请提供示例

你可以使用Python的os模块来启动和关闭mac系统上的某个程序。下面是一个示例:import os# 启动程序 os.system("open -a /Applications/ProgramName.app")# 关闭程序 os.system("killall ProgramName")

猜你喜欢

转载自blog.csdn.net/weixin_42613017/article/details/129531531