[IPython-dev] replacement for deep_reload.py
fperez at colorado.edu
Wed Oct 1 14:44:31 CDT 2003
Ralf Schmitt wrote:
> I've just hacked my own version of deep_reload.py.
> It works by replacing sys.modules with an empty hash and installing
> it's __builtin__.__import__, which just calls __builtin__.reload and the old
> The only problem I've discovered so far, is that dreload(os)
> doesn't work (dreload(some module which imports os) however does work).
> I've tested it with python 2.3.1 and IPython from cvs.
> The code is very simple, so maybe you can save yourself some headache :)
> I'll use that version in the next few days, and will report on other
> problems I found..
> - Ralf
Great! Many thanks for this. Please give it a bit more pounding, and I'd
encourage other users of dreload to also try it out. The code is definitely
far simpler than the original dreload, but since I don't understand that code
too well, I'd like to tiptoe a bit on this issue. If it survives a bit of
pounding and discussion, I'll definitely be glad to put it in.
Obviously, I'll also test it myself and think about it a bit.
More information about the IPython-dev