I have a long-running Python server and would like to be able to upgrade a service without restarting the server. What\'s the best way do do this?
if foo.py
For those like me who want to unload all modules (when running in the Python interpreter under Emacs):
for mod in sys.modules.values(): reload(mod)
More information is in Reloading Python modules.