/usr/share/doc/python-notify/examples/test-replace.py is in python-notify 0.1.1-3ubuntu2.
This file is owned by root:root, with mode 0o755.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 | #!/usr/bin/env python
import pygtk
pygtk.require('2.0')
import pynotify
import sys
import time
if __name__ == '__main__':
if not pynotify.init("Replace Test"):
sys.exit(1)
n = pynotify.Notification("Summary", "First message")
n.set_timeout(0)
if not n.show():
print "Failed to send notification"
sys.exit(1)
time.sleep(3)
n.update("Second Summary", "First mesage was replaced")
n.set_timeout(pynotify.EXPIRES_DEFAULT)
if not n.show():
print "Failed to send notification"
sys.exit(1)
|