简体   繁体   中英

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. Main problem is, I don't have access to a mac at all, so coding specifically for it could be very difficult. wxPython seems like massive overkill for simple popups, so is there anything with a lighter footprint?

Does Python on Windows and Mac also ship with Tk wrappers? 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.

I am thinking about other cross-platform apps such as Skype, Dropbox, and Thunderbird. Skype and Thunderbird seem to have rolled their own, and Dropbox went the platform-specific route.

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. 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. Mono with GTK# comes to mind as it supports the three major desktop platforms. See this GtkSharpNotification example perhaps.

Finally, for my third strike, maybe a cross-platform GUI toolkit like wxWidgets has the widget you need.

Seems like one way to go would be something like Growl/GNTP. Have you looked at python's gntp library ?

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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