August 19, 2009

Directory support in pywatch 0.4

The latest release of pywatch now naively sup­ports watch­ing a direc­tory of files.

Pre­vi­ously, if you wanted to watch more than one file you had to list them one by one or use bash glob expan­sion ala:

pywatch mycommand.sh file1.py file2.py file3.txt pywatch mycommand.sh ./src/*.py

But you can now pass a direc­tory in and all files and fold­ers 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 press­ing need for it.

Pywatch grew out of a desire to have some­thing sim­i­lar to ZenTest’s autotest, but it’ll run any com­mand you like when­ever a file changes.

I use it almost exclu­sively to run tests every time I save changes to projects I’m coding at work and on per­sonal projects.

It’s avail­able at GitHub and PyPI

Filed under: Programming,Python,Pywatch

Next:
Previous:

Related

Comments