This question already has an answer here:
- How do I watch a file for changes? 21 answers
I would like to invoke my chrome
or firefox
browser when a file that I specify is modified. How could I "watch" that file to do something when it gets modified?
Programmatically it seems the steps are.. basically set a never ending interval every second or so and cache the initial modification date, then compare the date every second, when it changes invoke X.
The Linux Kernel has a file monitoring API called inotify. A python binding is pyinotify.
With it, you can build what you want.