I have a package MyPak and a module MyMod. The files are organized in the following way:
somedir/MyPak/MyMod.py
in MyMod.py there is only a Class whose name is also MyMod
in directory somedir/MyPak, if I do the import:
import MyMod
I got MyMod imported as a Module.
But in directory somedir/, if I do
from MyPak import MyMod
I got MyMod imported as a Class, not a Module. Why is this the case?