I have created a module, it's sitting in its own folder with an __init__.py and four files that contain my classes.
When doing from MyPackage import * I'm getting the modules that I have written into the __all__ statement in my __init__.py just as expected.
When doing from MyPackage import ModuleX I can import any module individually just fine.
When doing import MyPackage and then say dir(MyPackage) however, all I get is this:
['__all__',
'__builtins__',
'__doc__',
'__file__',
'__name__',
'__package__',
'__path__']
My modules aren't shown and I can't access them using MyPackage.ModuleX either.
The only thing I have written into my __init__.py is the __all__ = [ModuleX] statement.
Why does the last statement not see my modules? Do I have to set some more configuration?