EDIT: Is from __future__ import absolute_importit available in IronPython? I just realized that all I use is just python, the project as a whole is in IronPython.
I am trying to use relative imports (instead of adding to sys.path). Here is my directory structure:
-src
|
-runners
|
-__init__.py
-clippyRunner.py
|
-__init__.py
-clippy.py
-irondb.py
-ironxl.py
now, in clippyRunner.py, I want to import a clip, which, as you can see, is in the parent directory src. so i did this:
from __future__ import absolute_import
from ...src import clippy
but this gives me this error:
ValueError: Attempted relative import in non-package
I also tried
from ..src import clippy
with the same results.
what am i doing wrong here?
EDIT: I also tried import ..clippy
which just gives me:SyntaxError: unexpected token '.'
source
share