I am trying to find out how the __init__.py file works for packaging and calling modules from different directories.
I have a directory structure like this:
init_test\ __init__.py a\ aaa.py b\ bbb.py
in aaa.py there is a function called test
bbb.py looks like this:
import init_test.a.aaa if __name__ == "__main__": init_test.a.aaa.test()
but it gives me ImportError: No module named a.aaa
What am I doing wrong? I tried to do the same basic thing from the module on the package structure, and not inside the package, and that also did not work? My __init__.py
source share