I would like to be able to distinguish between development and production environment.
Use Case
I have a huge legacy code base (python) before me.
I am unsure whether some methods are still used in production or not.
My current strategy
I want to raise an exception if the code gets used in a development environment. But on production the exception should not get raised, but a warning should get emitted. If there is no warning in about 3 months, then I know with probability bordering on certainty that this code can be removed.
Question
How to Dinstinguish between Development and Production Environment