I
Irmen de Jong
Hi,
I have a package with several modules in it. The package also has some objects created
in the package scope (done in the package __init__.py).
Is it possible to access those package scope objects from the modules, with relative
imports or something? So that I don't have to import the package itself in its own
submodules?
Example:
A/
__init__.py -> creates A.something
thing.py -> needs to do "import A" to access A.something
would like to not have to import A
I think it's something simple I'm missing...
Irmen
I have a package with several modules in it. The package also has some objects created
in the package scope (done in the package __init__.py).
Is it possible to access those package scope objects from the modules, with relative
imports or something? So that I don't have to import the package itself in its own
submodules?
Example:
A/
__init__.py -> creates A.something
thing.py -> needs to do "import A" to access A.something
would like to not have to import A
I think it's something simple I'm missing...
Irmen