Guest User

Untitled

a guest
Apr 10th, 2014
72
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.52 KB | None | 0 0
  1. # This program handles notifications for secure.py. It's just a test. Let's see
  2. # if it actually works. :)
  3.  
  4. import pygtk
  5. pygtk.require('2.0')
  6. import pynotify
  7. import sys
  8.  
  9. def notification(msg):
  10.     print "in notification before init...."
  11.     if not pynotify.init("Notification"):
  12.         sys.exit(1)
  13.     print "in notification.py --- ", msg
  14.     n = pynotify.Notification("Notification", msg)
  15.     print "\n\n After setting n\n\n\n"
  16.  
  17.     if not n.show():
  18.         print "Failed to send notificatoin."
  19.         sys.exit(1)
Advertisement
Add Comment
Please, Sign In to add comment