Skip to content

Instantly share code, notes, and snippets.

@siwells
Created September 25, 2011 00:05
Show Gist options
  • Save siwells/1240019 to your computer and use it in GitHub Desktop.
Save siwells/1240019 to your computer and use it in GitHub Desktop.
Playing with pynotify on Ubuntu to display notifications
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