Reloading Python Modules

Being able to reload code modules is one of the many nice features of Python.
This allows developers to modify parts of a Python application while the
interpreter is running. In general, all that needs to be done is pass a
module object to the imp.reload() function (or just reload() in Python
2.x), and the module will be reloaded from its source file.

There are a few potential complications, however.

If any other code references symbols exported by the reloaded module, they maystill be bound t...

 •  0 comments  •  flag
Share on Twitter
Published on May 15, 2010 18:00
No comments have been added yet.