My code structure is as follows:
Main Code
Directory 1
file1.py
file2.py
...
Directory 2
x.py
y.py
Directory 3
main_script.py
In main script.py we have the following imports
from MainCode.Directory2.x import *
When I execute this code,I get the error: No module named MainCode
Any ideas on how to fix these kind of errors.I am assuming that this knowledge will be useful as I develop bigger packages and I can't have all my files living in one directory.