fwatch.py – A Python File Watcher

pythonI needed a program to watch a file for changes and then execute a command when the watched file changes. I’ve been messing around with Python 3.6 lately so I decided I would write the program that I needed.

A quick visit to Stack Overflow got me pointed in the right direction and the result is fwatch.py, a simple script that does exactly what I mentioned above. I wrote it on my Windows box and I have not had a chance to run it under another OS. it should work, however…

I put the code on GitHub, if anyone is interested. fwatch, works by watching a (user specified) file’s timestamp and runs a (user defined) command when the timestamp changes.

Leave a Reply

Your email address will not be published. Required fields are marked *

17 + seventeen =

This site uses Akismet to reduce spam. Learn how your comment data is processed.