I would like to do the following import:
from . import foo.bar.foobar
Why is that a problem for python? Alternatively
from .foo.bar import foobar
does not work either.
The foobar module should be imported from the example.py file as seen in this folder structure:
test/
|____foo/
| |____bar/
| |___ __init__.py
| |___ foobar.py
|
|____core/
|____ example.py
What works is
sys.path.insert(0, r"../foo/bar")
import foobar
but i wondered if there was another way.