Growl Python 与点击反馈绑定?
我正在尝试使用 Growl Python 绑定(来自 Growl 存储库的 Growl.py v0.7)来编写一个小型应用程序。当前缺少的功能之一是发送到 Python 的点击通知。
我知道在 Objective-C 中,当用户单击通知时,它会向正在运行的应用程序发送触发器。我想对 Python 绑定做类似的事情。当用户单击通知时,我想让 Python 程序在浏览器中打开 URL(或以其他方式处理事件)。
关于我如何实现它有什么想法吗?
更新:感谢synthesizerpatel提供了一个有前途的解决方案,我相信他的话,它在Lion上有效。不幸的是,我开始淡出 Mac,所以我不再做太多 Mac 编程了。不过,我做了一些调试,因为它仍然无法在 Snow Leopard 上运行,原因如下:
I'm trying to use the Growl Python bindings (Growl.py v0.7 from the Growl repository) to write a small application. One of the features that's currently missing is the click notification sent to Python.
I know in Objective-C, when a user clicks the notification, it will send a trigger to the running application. I'd like to do a similar thing with the Python bindings. When a user clicks a notification, I'd like to have the Python program open a URL in the browser (or handle the event in another manner).
Any thoughts on how I might accomplish it?
Update: thanks to synthesizerpatel who provides a promising solution and I take his words it worked on Lion. Unfortunately, I'm beginning to fade out from Mac, so I don't do much Mac programming anymore. Though, I did some debugging as it's still not working on Snow Leopard, and here is why:
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
这是你想要的吗?
Is this what you want?