-
Notifications
You must be signed in to change notification settings - Fork 378
List of Examples
Daniel Heule edited this page Nov 3, 2020
·
16 revisions
- loop.py: minimal example, should be read first
- daemon.py: simple example demonstrating how to daemonize pyinotify
- chain.py shows how to chain together several processing methods for the same event
- exclude.py and exclude.lst show how to exclude a list of files from being watched
- not_quiet.py demonstrates how to raise exceptions on errors
-
stats.py: simple example for displaying statistics, but it is a pretext for using processing methods, as well as chaining and callback functions on
notifier.loop()
-
stats_threaded.py has the same purpose than
stats.py
but use a separate thread instead, this demonstrate how to useThreadedNotifier
- transient_file.py and transient_file.sh is used for watching a transient file
-
tutorial_asyncnotifier.py: simple example using
AsyncNotifier
class as notifier (relies on asyncore module) - tutorial_notifier.py and tutorial_threadednotifier.py are used as examples in the Tutorial
- autocompile.py can be used to recompile a target automatically when monitored files are modified.
- coalesce.py: coalescing events.
Directly browse all these examples files from Pyinotify's repository.
- react, Alexander Bernauer's command line tool for inotify. Used for example to trigger execution of test suites when source files change.
- spotter, another command line tool for running arbitrary commands when files change.
- doit, a build-tool with built-in support for Pyinotify.
- pyinotifyd, A daemon to monitore filesystems events with inotify on Linux and execute tasks (Python methods or Shell commands) with an optional delay
If you wrote a short, self-contained example / project using Pyinotify and you want to share it, please edit this section or drop me a mail and I will include it here.