diff options
author | Sebastien Martini <seb@dbzteam.org> | 2010-05-13 22:42:40 +0200 |
---|---|---|
committer | Sebastien Martini <seb@dbzteam.org> | 2010-05-13 22:42:40 +0200 |
commit | 2f2dd6ba0999dbc40e5bfbcc66af2cc676d3046a (patch) | |
tree | 75e2278e1c90e73c37e41a316ab609658abf1a7f /python2/examples/tutorial_asyncnotifier.py | |
parent | b18898f9d88319c43a06ad1052c3daa82e9d3022 (diff) | |
download | pyinotify-2f2dd6ba0999dbc40e5bfbcc66af2cc676d3046a.tar.gz |
Updated examples.
Diffstat (limited to 'python2/examples/tutorial_asyncnotifier.py')
-rw-r--r-- | python2/examples/tutorial_asyncnotifier.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/python2/examples/tutorial_asyncnotifier.py b/python2/examples/tutorial_asyncnotifier.py index 16e276f..0e98a8b 100644 --- a/python2/examples/tutorial_asyncnotifier.py +++ b/python2/examples/tutorial_asyncnotifier.py @@ -8,14 +8,14 @@ import pyinotify wm = pyinotify.WatchManager() # Watch Manager mask = pyinotify.IN_DELETE | pyinotify.IN_CREATE # watched events -class HandleEvents(pyinotify.ProcessEvent): +class EventHandler(pyinotify.ProcessEvent): def process_IN_CREATE(self, event): print "Creating:", event.pathname def process_IN_DELETE(self, event): print "Removing:", event.pathname -notifier = pyinotify.AsyncNotifier(wm, HandleEvents()) +notifier = pyinotify.AsyncNotifier(wm, EventHandler()) wdd = wm.add_watch('/tmp', mask, rec=True) asyncore.loop() |