The latest release of [pywatch][pywatch-git] now naively supports watching a directory of files.
Previously, if you wanted to watch more than one file you had to list them one by one or use bash glob expansion ala:
pywatch mycommand.sh file1.py file2.py file3.txt
pywatch mycommand.sh ./src/*.py
But you can now pass a directory in and all files and folders will be watched:
pywatch ./bin/test ./src/pywatch
**Note:** It won’t notice new or deleted files, but I’ll hack on that next if anyone has a pressing need for it.
Pywatch grew out of a desire to have something similar to [ZenTest’s autotest][zentest], but it’ll run any command you like whenever a file changes.
I use it almost exclusively to run tests every time I save changes to projects I’m coding at work and on personal projects.
It’s available at [GitHub][pywatch-git] and [PyPI][pywatch-pypi]