I have the following structure:
folderA
├── __init__.py
└── folderB
├── __init__.py
└── folderC
├── __init__.py
└── module.py
I want to be able to import folderC without having to call folderB, like the following way:
from folderA.folderC.module import *
And I have written the following things in the files:
folderA/__init__.py:
from .folderB import *
folderA/folderB/__init__.py:
# empty
folderA/folderB/folderC/__init__.py:
from .module import hello
folderA/folderB/folderC/module.py:
def hello():
print("hello world")
But I received the following error message:
ModuleNotFoundError: No module named 'folderA.folderC'
How can I import folderC without having to name folderB in the process?