LogoopenSUSE Build Service > Projects
Sign Up | Log In

Watches directories for changes and runs a shell command when something does change

Very simple, uses pyinotify to detect changes to the directory.

Only actually acts on the IN_CLOSE_WRITE inotify event, that is, when a file is closed after writing. The use case for me is that I'm editing a file, and I want to automatically run some command whenever the file changes. I don't want it to run the command while the file is being edited though, only when I've actually finished writing my changes to it. Just listening to this event seems to work perfectly fine.

Source Files

Filename Size Changed Actions
python-watchdir.changes 137 Bytes almost 5 years ago Download File
watchdir-1.0.tar.bz2 2.6 KB almost 5 years ago Download File
watchdir.spec 1.71 KB almost 5 years ago Download File

Comments for home:KGronlund (0)