I have a package MyPak and a module MyMod. The files are organized in the following way:
somedir/MyPak/MyMod.py
in MyMod.py ther
This behavior is indicative that you have a file:
somedir/MyPak/__init__.py
wherein you do the following:
from MyMod import *
When you import MyPak
, it imports from that __init__.py
- likewise, when you from MyPak import something
, it's going to try to pull from the namespace for the package - which will look inside that __init__.py
Because you imported everything from MyMod
inside __init__.py
, now the class is local to the MyPak
package, and masks the MyMod.py
file.