In my application I am using module within the package example
called examplemod
.
My app:
from example import examplemod
examplemod.do_stuff()
It imports another module within example
like so.
examplemod.py:
from example import config
# uses config
# then does stuff
config
uses a constant.
config.py:
CONSTANT = "Unfortunate value"
I'd like to override this constant when I'm using examplemod
in my application (setting it to CONSTANT = "Better value"
) and I'd prefer not to modify the underlying module so I don't have to maintain my own package. How can I do this?