August 19, 2009
Directory support in pywatch 0.4
The latest release of pywatch 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, 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 and PyPI
Filed under: Programming,Python,Pywatch
Next: A short introduction to Django and Gearman
Previous: July 4th Burger
Comments