简化使用Python编写Mac应用程序
项目描述
使用Twisted简化在Python中编写小型macOS应用程序
获取一个非常基本的状态菜单API
from quickmacapp import mainpoint, Status, answer, quit
from twisted.internet.defer import Deferred
@mainpoint()
def app(reactor):
s = Status("☀️ 💣")
s.menu([("Do Something", lambda: Deferred.fromCoroutine(answer("something"))),
("Quit", quit)])
app.runMain()
将此打包成可工作的应用程序捆绑包目前留给读者作为练习。
此项目最初是从https://github.com/glyph/Pomodouroboros/中提取出来的