How do I unload (reload) a Python module?

You can reload a module when it has already been imported by using importlib.reload(): In Python 2, reload was a builtin. In Python 3, it was moved to the imp module. In 3.4, imp was deprecated in favor of importlib. When targeting 3 or later, either reference the appropriate module when calling reload or import it. I think that this is what you want. Web servers like Django’s development … Read more

tech