I’m trying to re-organise my code-base into a proper Python package (with subpackages) ready for uploading to PyPI. I have the following directories (for testing):
Py6S/
__init__.py
test.py
Params/
__init__.py
AeroModel.py
AeroModel.py contains:
class AeroModel:
NO_AEROSOL=0
CONTINENTAL=1
MARITIME=2
URBAN=3
USER=4
DESERT=5
BIOMASS_BURNING=6
STRATOSPHERIC=7
The Py6S init.py contains:
__all__ = ["Params"]
The Params init.py contains:
__all__ = ["AtmosModel", "AeroModel", "AtmosCorr"]
However, when I do from Py6S import * I get Params available to reference, but not AtmosModel or AeroModel.
I want to be able to type from Py6S import * and get all of AeroModel, AtmosModel, AtmosCorr etc available to use without having to put any module names in front of them.
if Py6S’s
__init__.pyhasfrom Params import *:you’d need to do:
to add those to Py6S’s
__all__