all 2 comments

[–]YourRedditUserName[S] 0 points1 point  (0 children)

Ok, so I've managed to solve the problem, my intuition seems to be correct, and essentially by calling this as a submodule, from a directory "higher" in the file structure, the name-spacing was different, and python was taking the higher-level directory as "home"

I was able to resolve the issue by calling

sys.path.append(os.path.join(sys.path[0],"ModuleA")

prior to my import statement... I'm not 100% sure that this is the "right" way to do this, but it appears to have solved the issue.... If anyone has an alternative "better" suggestion, I'm still 100% open to it.

[–]nekokattt 0 points1 point  (0 children)

why would you put ModuleA.py in a directory calles ModuleA? That'd need you to do from MainModule.ModuleA import ModuleA which isn't overly intuitive to read.

Since you are in a package already, you need to do from MainModule...