I have the file structure of:
mainprogram.py
/Scripts
Data.py
where the file Data.py is in the folder Scripts, and contains a set of functions and mainprogram.py is trying to import those functions.
If Data.py was in the same folder as the file mainprogram.py, then I could simply write from Data import * and i would have all the defined functions from the file.
However, i always get the error: ModuleNotFoundError: No module named '__main__.Scripts'; '__main__' is not a package if I try to import it from the Scripts folder.
I have tried various methods including: from .Scripts.Data import * and from \\Scripts\\Data import *
Am I missing something, or is there a better way to import Data.py from a sub-folder?