Here is my file structure:
- Main Directory/
- Main.py
- Module/
- init.py
- ExampleScript.py
- ExampleScript2.py
- SubModule/
- init.py
- ExampleScript3.py
The code in Main.py is
from Module import * # The error is here
which should import everything from the Module folder
in ExampleScript.py and ExampleScript2.py I have
import SubModule.ExampleScript3
and in ExampleScript3.py I have
print("example")
the desired output is when I run Main.py I get "example" printed to the console but, when I run Main.py I get a ModuleNotFoundError: No module named 'SubModule' where as when it is ran from ExampleScript1 or 2 it prints the desired output
and yes, I know that running Main.py would print "example" twice.
does anybody know how I can get this to work?
also this is my first question, sorry if I got anything wrong with formatting.