gorun.py - Using (py)inotify to run commands when files change

20 July 2009   0 comments   Python


Mind That Age!

This blog post is 10 years old! Most likely, its content is outdated. Especially if it's technical.

gorun.py - Using (py)inotify to run commands when files changeBy popular demand I've made my little pyinotify wrapper available for download. It's nothing fancy really but damn useful and productive.

It relies on inotify (so you're stuffed on OSX and Windows) which makes it very fast and efficient (as opposed to periodic polling and file modification time comparisons).

At the moment it's actually quite generic for any command and any file but I'm hoping to take this to the next level with some magic dust that automatically only runs unit tests that fail or something. We'll see what happens.

Here's an example configuration that I'm currently using:

   './manage.py test --settings=test_settings search.ViewTestCase'),

   './manage.py test --settings=test_settings search'),

   './manage.py test --settings=test_settings search'),


Your email will never ever be published

Related posts

Getting uploadify to work 17 July 2009
Battery life usage on an iPhone 3G(S) 27 July 2009
Related by Keyword:
EditDistanceMatcher - NodeJS script for doing edit distance 1 matching 05 February 2011
Correction: running Django tests with MongoDB is NOT slow 30 May 2010
setuptools usability - not good, what can be done? 15 July 2009
To assert or assertEqual in Python unit testing 14 February 2009
Django vs. Java 25 October 2008