1 2 3 4 5 6 7 8
# Example # import pyinotify wm = pyinotify.WatchManager() notifier = pyinotify.Notifier(wm) wm.add_watch('/tmp', pyinotify.ALL_EVENTS) notifier.loop()