views:

343

answers:

2

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?

+1  A: 

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.

jhs
All good suggestions! Unfortunately, it all really seems like overkill for literally just a box that pops onto and off the screen! :(
Phoshi
Yes it definitely depends on your situation and whether it's a retail app, business app, or what. I admit, I find none of my ideas very compelling but you're trying to avoid mainaining three codebases, long-term.
jhs
They're good ideas, and I'd certainly consider them if this were a larger project, but it's not at all :(
Phoshi
Just added a second shoot-from-the-hip answer about Tk. Sorry, I'm all out of ideas! :)
jhs
+1  A: 

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 (i.e. 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.

jhs
I just tried `import Tkinter`, and nothing went wrong, so I think this should do great! Thank you :)
Phoshi
You're welcome! Wow, total shot in the dark :)
jhs