A module to change reload() so that it acts recursively. To enable it type:
>>> import __builtin__, deep_reload >>> __builtin__.reload = deep_reload.reload
>>> __builtin__.reload = deep_reload.original_reload
>>> __builtin__.dreload = deep_reload.reload
This code is almost entirely based on knee.py from the standard library.
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.