I'm trying to understand the import-logic in Python.
If you take this tutorial as a reference, I think you won't be able to, for example state:
from sound.effects import echo
At least, not from within the package.
However, Suds (a package I'm interested in) does something like that here
A fragment of suds/suds/builder.py:
from logging import getLogger
from suds import *
from suds.sudsobject import Factory
..
folder structure:
suds/
...no_package_init_file_here...
suds/
__init__.py
builder.py
sudsobject.py
...
How, and why does this work?
I thought it was kind-of 'not-allowed' to use the container package name within the package. As a rule of thumb.
Now, there is one thing I can think of: suds will add itself to the PYTHONPATH and thereby becomes accessible to every level. Is that the reason?
And, do you guys think that Suds has a smart solution here? Or is a bit hacky?
Thanks in advance.