Skip to content

Instantly share code, notes, and snippets.

Avatar

SgDylan Sg4Dylan

View GitHub Profile
@eberle1080
eberle1080 / module_watcher.py
Created Jun 7, 2011
Automatically reload python module / package on file change
View module_watcher.py
#!/usr/bin/env python
# Author: Chris Eberle <eberle1080@gmail.com>
# Watch for any changes in a module or package, and reload it automatically
import pyinotify
import imp
import os
class ModuleWatcher(pyinotify.ProcessEvent):
"""
You can’t perform that action at this time.