简体   繁体   English

跨平台Python通知库

[英]Cross-Platform Python Notification Library

I'm making a python script that should run in the background and notify a user of changes, and I'd quite like it to work cross-platform. 我正在制作一个应该在后台运行的python脚本并通知用户更改,我非常希望它可以跨平台工作。 Main problem is, I don't have access to a mac at all, so coding specifically for it could be very difficult. 主要问题是,我根本无法访问mac,因此专门为它编码可能非常困难。 wxPython seems like massive overkill for simple popups, so is there anything with a lighter footprint? 对于简单的弹出窗口来说,wxPython看起来像是大规模的过度杀伤,所以有什么东西有更轻的足迹吗?

Does Python on Windows and Mac also ship with Tk wrappers? Windows和Mac上的Python是否也附带Tk包装器? If so, you might be able to roll your own notification box. 如果是这样,您可以滚动自己的通知框。 I do not think they have a dead-simple notification API (ie you pass it a string and a cute box pops up for 5 seconds) however at least you will only have one codebase to maintain. 我不认为他们有一个死简单的通知API(即你传递一个字符串,一个可爱的框弹出5秒)但是至少你只需要一个代码库来维护。

I am thinking about other cross-platform apps such as Skype, Dropbox, and Thunderbird. 我正在考虑其他跨平台的应用程序,如Skype,Dropbox和Thunderbird。 Skype and Thunderbird seem to have rolled their own, and Dropbox went the platform-specific route. Skype和Thunderbird似乎已经推出了自己的产品,而Dropbox则采用了特定于平台的路线。

Adobe Wave is a cross-platform notification framework however I have not used it and I do not believe it is a desktop-oriented deal, but rather something for rich Internet Apps and plugging into web sites. Adobe Wave是一个跨平台的通知框架,但我没有使用它,我不相信它是面向桌面的交易,而是富Internet代理和插入网站的东西。 Still, it's some sort of cross-platform notification so possibly worth a look-see. 不过,这是某种跨平台通知,所以值得一看。

That reminds me, you may be able to find an AIR notification system out there that you could somehow trigger from Python. 这提醒我,你可能能够在那里找到一个可以以某种方式从Python触发的AIR通知系统。 Mono with GTK# comes to mind as it supports the three major desktop platforms. 我想到了带有GTK#的Mono,因为它支持三种主要的桌面平台。 See this GtkSharpNotification example perhaps. 请参阅此GtkSharpNotification示例。

Finally, for my third strike, maybe a cross-platform GUI toolkit like wxWidgets has the widget you need. 最后,对于我的第三次攻击,也许像wxWidgets这样的跨平台GUI工具包具有您需要的小部件。

Seems like one way to go would be something like Growl/GNTP. 似乎有一种方法可以像Growl / GNTP。 Have you looked at python's gntp library ? 你看过python的gntp库吗?

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM