1. JanKanis
  2. python-inotify


JanKanis  committed 435887b

update README, small changes to watcher.py

  • Participants
  • Parent commits 08814db
  • Branches default

Comments (0)

Files changed (2)


View file
 slow to the extent that I stopped trying to fix its problems and wrote
 a new implementation instead.
+One difference is that pyinotify has a callback based API in which you 
+define callbacks or methods that are called when a specific event happens, 
+forcing an event-driven programmig style. Python-inotify has an API that 
+allows you to use a blocking `Watcher.read()` call. 
 You can find pyinotify at http://pyinotify.sourceforge.net/

File inotify/watcher.py

View file
         for evt in inotify.read(self.fd, bufsize):
             event = Event(evt, None if evt.wd == -1 else self._wds[evt.wd][0])
-            if evt.mask & inotify.IN_IGNORED:
+            if evt.ignored:
-            elif evt.mask & inotify.IN_UNMOUNT:
+            elif evt.umount:
         return events
         callable that takes one parameter.  It will be called each time
         a directory is about to be automatically watched.  If it returns
         True, the directory will be watched if it still exists,
-        otherwise, it will beb skipped.'''
+        otherwise, it will be skipped.'''
         super(AutoWatcher, self).__init__()
         self.addfilter = addfilter