This is a pre-production deployment of Warehouse, however changes made here WILL affect the production instance of PyPI.
Latest Version Dependencies status unknown Test status unknown Test coverage unknown
Project Description

(c) Peter Bengtsson,, 2009-2012 License: Python

Using (py)inotify to run commands when files change

Tired of switching console, arrow-up, Enter, switch console back for every little change you make when you’re writing code that has tests? Running with enables you to just save in your editor and the tests are run automatically and immediately. does not use a slow pulling process which keeps taps on files modification time. Instead it uses the inotify which is “a Linux kernel subsystem that provides file system event notification”.


This will only work on Linux which has the inotify module enabled in the kernel. (Most modern kernels do)

pip install gorun

This will install pyinotify.

Then, create a settings file, which is just a python file that is expected to define a variable called DIRECTORIES. Here’s an example:

   ('some/place/', './myframework test --dir some/place'),
    './myframework test --dir some/place --testclass Unittests'),
    'growl downloads --logfile /var/log/torrentsdownload.log'),

Save that file as, for example, and then start it like this:

$ gorun_settings


Once you’ve set gorun to monitor a directory it will kick off on any file that changes in that directory. By default things like autosave files from certain editors are automatically created (e.g. or and these are ignored. If there are other file extensions you want gorun to ignore add this to your settings file:


This will add to the list of already ignored file extensions such as .pyc.

Similarly, if there are certain directories that you don’t want the inotify to notice, you can list them like this:

IGNORE_DIRECTORIES = ('xapian_index', '.autosavefiles')


This code hasn’t been extensively tested and relies on importing python modules so don’t let untrusted morons fiddle with your dev environment.


When doing Django development I often run on single test method over and over and over again till I get rid of all errors. When doing this I have to change the settings so it just runs one single test and when I’m done I go back to set it up so that it runs all tests when adjacent code works.

This is a nuisance and I might try to solve that one day. If you have any tips please let me know.

Release History

Release History


This version

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

Download Files

Download Files

TODO: Brief introduction on what you do with files - including link to relevant help section.

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
gorun-1.7.tar.gz (5.7 kB) Copy SHA256 Checksum SHA256 Source Oct 19, 2012

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS HPE HPE Development Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting