Closed praiskup closed 4 years ago
Hmm, this doesn't work in the git submodule case:
stderr output from native app textern: Traceback (most recent call last):
stderr output from native app textern: File "/home/jlebon/.local/libexec/textern/textern.py", line 17, in <module>
stderr output from native app textern: from inotify_simple import INotify, flags
stderr output from native app textern: ImportError: cannot import name 'INotify' from 'inotify_simple' (unknown location)
I think because the actual inotify_simple
Python module is nested.
Probably easiest thing to do is to check if the inotify_simple
directory exists where the script is and add it to sys.path
if so?
Probably easiest thing to do is to check if the inotify_simple directory exists where the script is and add it to sys.path if so?
Maybe even easier is to fallback to import the old pattern. But feel free to enhance the import pattern in git-submodule use-case. That does probably something unexpected.
iow, pr updated
In new inotify_simple there's no
inotify_simple/inotify_simple.py
file, but onlyinotify_simple.py
. So fix the import. This should be also compatible with previous versions of inotify_simple where they didfrom .inotify_simple import *
inside__init__.py
.