Public bug reported:

import pyinotify
from pyinotify import (ProcessEvent, SimpleINotify, EventsCodes, )

would fail with the following kind of errors

[EMAIL PROTECTED]:~/vcs2/trunk$ python ./inotify.py 
['__builtins__', '__doc__', '__file__', '__name__', 'os', 'select', 'struct', 
'sys', 'threading']
Traceback (most recent call last):
  File "./inotify.py", line 1, in <module>
    import pyinotify
  File "/var/lib/python-support/python2.5/pyinotify/pyinotify.py", line 38, in 
<module>
    from inotify import inotify_init, inotify_add_watch, inotify_rm_watch
  File "/home/pete/vcs2/trunk/inotify.py", line 3, in <module>
    from pyinotify import (ProcessEvent, SimpleINotify, EventCodes, )
ImportError: cannot import name ProcessEvent

Looking at the pyinotify.py file in the python-support folders, the line

from inotify import inotify_init, inotify_add_watch, inotify_rm_watch

points to the inotify.py file which has none of those functions/modules
in it

changing that line to

from _inotify import inotify_init, inotify_add_watch, inotify_rm_watch

loads the _inotify.so lib instead, which has those built in.

** Affects: pyinotify (Ubuntu)
     Importance: High
         Status: Unconfirmed

** Changed in: pyinotify (Ubuntu)
   Importance: Undecided => High

-- 
pyinotify doesn't import classes
https://bugs.launchpad.net/bugs/112376
You received this bug notification because you are a member of Ubuntu
Bugs, which is the bug contact for Ubuntu.

-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to