4 ms·
Automatically running a command whenever a file is saved
- mthomas 16y agoI notice that you're using a polling thread keep track of modification times. I know that linux has inotify: http://github.com/seb-m/pyinotify http://github.com/seb-m/pyinotify and OsX has something similar with FSEvents: http://pypi.python.org/pypi/MacFSEvents http://pypi.python.org/pypi/MacFSEvents
- shabble 16y agoI quite like http://search.cpan.org/~drolsky/File-ChangeNotify-0.17/lib/File/ChangeNotify.pm http://search.cpan.org/~drolsky/File-ChangeNotify-0.17/lib/F... for perl. It's cross-platform (backends for linux, OSX/BSD and Win32 afaik), and is very straightforward to use.
- lenni 16y agoOh great, I looked around but haven't found anything like it.
- zacharydanger 16y agoSounds like incron. Which is just a cron-like interface for inotify.