I want to define a constant that should be available in all of the submodules of a package. I've thought that the best place would be in in the __init__.py
file of the root package. But I don't know how to do this. Suppose I have a few subpackages and each with several modules. How can I access that variable from these modules?
Of course, if this is totally wrong, and there is a better alternative, I'd like to know it.