[Python-Dev] Help with inotify

Neal Becker ndbecker2 at gmail.com
Thu Oct 27 19:27:53 CEST 2005

I'm trying to make a module to support inotify (linux).  I put together a
module using boost::python.  Problem is, inotify uses a file descriptor. 
If I call python os.fdopen on it, I get an error:
Python 2.4.1 (#1, May 16 2005, 15:15:14)
[GCC 4.0.0 20050512 (Red Hat 4.0.0-5)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> from inotify import *
>>> import os
>>> i=inotify()
>>> i.fileno()
>>> os.fdopen (i.fileno())
Traceback (most recent call last):
  File "<stdin>", line 1, in ?
IOError: [Errno 21] Is a directory

Any ideas?  I'd rather not have to trace through python if I could avoid it
(I don't even have source installed here).

More information about the Python-Dev mailing list