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-xy.py < prev   
Encoding:
Python Source  |  2006-04-26  |  418 b   |  20 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("XY"):
  10.         sys.exit(1)
  11.  
  12.     n = pynotify.Notification("X, Y Test",
  13.                               "This notification should point to 150, 10")
  14.     n.set_hint("x", 150)
  15.     n.set_hint("y", 10)
  16.  
  17.     if not n.show():
  18.         print "Failed to send notification"
  19.         sys.exit(1)
  20.