Created
September 25, 2011 00:05
-
-
Save siwells/1240019 to your computer and use it in GitHub Desktop.
Playing with pynotify on Ubuntu to display notifications
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import pynotify | |
def notificate(): | |
n = pynotify.Notification("Hello World", "Simon says HELLO", "notification-message-im") | |
n.set_urgency(pynotify.URGENCY_NORMAL) | |
n.set_timeout(200) | |
if not n.show(): | |
print "Failed to display notification" | |
sys.exit(1) | |
if __name__ == '__main__': | |
pynotify.init( "test" ) | |
notificate() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment