Tag Archives: monitor

Restart Python program if source has been modified

One of the nice features of developing a project with Django's development server, is the server's ability to restart/reload the project if its source has been modified.

I wanted to accomplish the same thing for an arbitrary Python program, and thus wrote a script, SourceChangeMonitor, to monitor a Python program for changes in the source code, and restart it when a change is detected.

Download: SourceChangeMonitor.py, a Python source code monitor

Continue reading