bundles / IPython 9.17.0 / IPython / lib / deepreload
module
IPython.lib.deepreload
Members
Summary
Provides a reload() function that acts recursively.
Extended Summary
Python's normal python:reload function only reloads the module that it's passed. The reload function in this module also reloads everything imported from that module, which is useful when you're changing files deep inside a package.
To use this as your default reload function, type this
import builtins from IPython.lib import deepreload builtins.reload = deepreload.reload
A reference to the original python:reload is stored in this module as original_reload, so you can restore it later.
This code is almost entirely based on knee.py, which is a Python re-implementation of hierarchical module import.
Additional content
Provides a reload() function that acts recursively.
Python's normal python:reload function only reloads the module that it's passed. The reload function in this module also reloads everything imported from that module, which is useful when you're changing files deep inside a package.
To use this as your default reload function, type this
import builtins from IPython.lib import deepreload builtins.reload = deepreload.reload
A reference to the original python:reload is stored in this module as original_reload, so you can restore it later.
This code is almost entirely based on knee.py, which is a Python re-implementation of hierarchical module import.
Aliases
IPython.lib.deepreload