views:

24

answers:

1

i have a module with many files, which i import in themselves for sharing of functionality

myModule/
-myFile1.py
-myFile2.py
-mySubmodule/
--myFile3.py

i can do import myFile2, inside of myFile1, but how can i do a import myFile2 in myFile3 without referencing the base module? i dont want to reference myModule, because i am working on a branch so the name is going to change.

A: 

You're asking about relative imports. See this question

Within myFile3, you want:

from .. import myFile2
ma3
thats what i was looking for. thank you.