I'm trying to learn 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 this gives me ImportError: No module named a.aaa
What am I doing wrong? I've tried doing the same basic thing from a module above the package structure as opposed to inside the package and that did not work either? My __init__.py