Python inotify wrapper originally by Bryan O'Sullivan