home *** CD-ROM | disk | FTP | other *** search
/ Mac Easy 2010 May / Mac Life Ubuntu.iso / casper / filesystem.squashfs / usr / share / doc / python-notify / examples / test-basic.py < prev    next >
Encoding:
Python Source  |  2006-04-25  |  327 b   |  17 lines

  1. #!/usr/bin/env python
  2.  
  3. import pygtk
  4. pygtk.require('2.0')
  5. import pynotify
  6. import sys
  7.  
  8. if __name__ == '__main__':
  9.     if not pynotify.init("Basics"):
  10.         sys.exit(1)
  11.  
  12.     n = pynotify.Notification("Summary", "This is some sample content")
  13.  
  14.     if not n.show():
  15.         print "Failed to send notification"
  16.         sys.exit(1)
  17.