this is also true if we import through the namespace package name immediately-because the namespace package is made when first reachedthe timing of path extensions is irrelevantc:\codec:\python \python import sub mod dir \sub\mod import sub mod dir \sub\mod one package spanning two directories sub mod sub mod sub sub __path__ _namespacepath([' :\\code\\ns\\dir \\sub'' :\\code\\ns\\dir \\sub']interestinglyrelative imports work in namespace packages too--in the followingthe relative import statement references file in the packageeven though the referenced file resides in different directoryc:\codetype ns\dir \sub\mod py from import mod print( 'dir \sub\mod 'and "from import stringstill fails :\codec:\python \python import sub mod relative import of mod in another dir dir \sub\mod dir \sub\mod import sub mod already imported module not rerun sub mod as you can seenamespace packages are like ordinary single-directory packages in every wayexcept for having split physical storage--which is why single directory namespaces packages without __init__ py files are exactly like regular packagesbut with no initialization logic to be run namespace package nesting namespace packages even support arbitrary nesting--once package namespace package is createdit serves essentially the same role at its level that sys path does at the topbecoming the "parent pathfor lower levels continuing the prior section' examplec:\codemkdir ns\dir \sub\lower further nested components :\codetype ns\dir \sub\lower\mod py module packages