this is the base code of pyinotfy.py as present at the pyinotify code repository.