I have this folder structure:
package/
__init__.py
misc/
__init__.py
tools.py
subpackage/
__init__.py
submodule.py
I am in submodule.py
, and I would like to import misc.tools
. I don't want to use absolute import to import package.misc.tools
, because then my package would only work when it's on the PYTHONPATH. So I want to use relative imports. But then, I also want the imported name to be misc.tools
, and not just tools
.
Is it possible?