diff options
author | Sebastien Martini <seb@dbzteam.org> | 2009-11-11 18:13:24 +0100 |
---|---|---|
committer | Sebastien Martini <seb@dbzteam.org> | 2009-11-11 18:13:24 +0100 |
commit | add26a10a28661d88710c99d10a1cf2065c06d04 (patch) | |
tree | 881319888979d2ca84e63732ee1f4f809b52e292 /python2/examples/transient_file.py | |
parent | 649429ae8af743d9c404c1cc219bd018ae073578 (diff) | |
download | pyinotify-add26a10a28661d88710c99d10a1cf2065c06d04.tar.gz |
Updated examples.
Diffstat (limited to 'python2/examples/transient_file.py')
-rw-r--r-- | python2/examples/transient_file.py | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/python2/examples/transient_file.py b/python2/examples/transient_file.py index 7957717..3df2a97 100644 --- a/python2/examples/transient_file.py +++ b/python2/examples/transient_file.py @@ -1,9 +1,9 @@ # Example: monitors transient files. # # Run this code, then run transient_file.sh in another shell. -from pyinotify import * +import pyinotify -class ProcessTransientFile(ProcessEvent): +class ProcessTransientFile(pyinotify.ProcessEvent): def process_IN_MODIFY(self, event): # We have explicitely registered for this kind of event. @@ -18,9 +18,9 @@ class ProcessTransientFile(ProcessEvent): print 'default: ', event.maskname -wm = WatchManager() -notifier = Notifier(wm) +wm = pyinotify.WatchManager() +notifier = pyinotify.Notifier(wm) # In this case you must give the class object (ProcessTransientFile) # as last parameter not a class instance. -wm.watch_transient_file('/tmp/test1234', IN_MODIFY, ProcessTransientFile) +wm.watch_transient_file('/tmp/test1234', pyinotify.IN_MODIFY, ProcessTransientFile) notifier.loop() |