deep_reload

Module: deep_reload

A module to change reload() so that it acts recursively. To enable it type:

>>> import __builtin__, deep_reload
>>> __builtin__.reload = deep_reload.reload
You can then disable it with:
>>> __builtin__.reload = deep_reload.original_reload
Alternatively, you can add a dreload builtin alongside normal reload with:
>>> __builtin__.dreload = deep_reload.reload

This code is almost entirely based on knee.py from the standard library.

Functions

IPython.deep_reload.deep_import_hook()
IPython.deep_reload.deep_reload_hook()
IPython.deep_reload.determine_parent()
IPython.deep_reload.ensure_fromlist()
IPython.deep_reload.find_head_package()
IPython.deep_reload.import_module()
IPython.deep_reload.load_tail()
IPython.deep_reload.reload()

Recursively reload all modules used in the given module. Optionally takes a list of modules to exclude from reloading. The default exclude list contains sys, __main__, and __builtin__, to prevent, e.g., resetting display, exception, and io hooks.

Table Of Contents

Previous topic

config.cutils

Next topic

demo

This Page