Tuesday, September 09, 2008

reload




If you are running a Python interpreter and you change a source file on disk, you need to reload it by doing:


reload(modulename)


You can also reload all modules with:


for mod in sys.modules.values():
reload(mod)


But this is probably the wrong thing to do. Read Reloading Python modules for more info.