So, I was playing around with python-notify just today, and I was amazed by how hard it is to find any examples not to mention atleast some documentation on it.
python-notify is developed and maintained by the guys over at galago-project.org who also developed libnotify. So python-notify is really just some python bindings for libnotify.
It's incredible how easy it is to use, but you still do need some examples, because well, you can't really guess what to write when you have no idea what anything in the library is called, nor how it works.
So I have decided to write some small examples using the library, also for future references for myself :)
This example just shows a basic notification, nothing fancy here really.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
This example shows the use of some simple HTML markup that libnotify supports.
1 2 3 4 5 6 7 8 9 10 11 12 13 14
This example shows the use of an image inside a notification. It will need an absolute path since the notification is handled by the notification daemon, and not by python itself.
1 2 3 4 5 6 7 8 9 10 11 12
That's it! It really is that simple.
Now go make something useful of it!