root / daemon.py
| Revision ca5ddc5f5eea62c76b6be75a1fbdedf663dbcfd0, 255 bytes (checked in by Sebastien Martini <ookoi@…>, 5 months ago) | |
|---|---|
|
|
| Line | |
|---|---|
| 1 | # Example |
| 2 | # |
| 3 | import pyinotify |
| 4 | |
| 5 | wm = pyinotify.WatchManager() |
| 6 | notifier = pyinotify.Notifier(wm) |
| 7 | wm.add_watch('/tmp', pyinotify.ALL_EVENTS) |
| 8 | notifier.loop(daemonize=True, pid_file='/tmp/pyinotify.pid', force_kill=True, |
| 9 | stdout='/tmp/stdout.txt') |
Note: See TracBrowser
for help on using the browser.