[IPython-user] how to use @dreload after a @run?

Maciej Kalisiak mac at cs.toronto.edu
Wed May 19 16:09:22 CDT 2004

On Mon, May 17, 2004 at 12:13:13AM -0400, Fernando Perez wrote:
> PS.  If dreload itself is giving you errors, please post them so that I can 
> fix them.  For single-module recursive calls, dreload() at least should 
> work (and I know of users who like it a lot).  Just send me a traceback and 
> I'll have a look.

Well, when I try "dreload" or "dreload()" (after a "@run foo.py"), I get

    In [3]: dreload()
    TypeError                                 Traceback (most recent call last)


    TypeError: reload() takes at least 1 argument (0 given)
    > <console>(1)?()

Also, as I understand it, the global scope of foo.py becomes the global scope
of IPython, and yet when I try "dreload math_extra" (the latter is directly
imported by foo.py), I get

    In [4]: dreload math_extra
    ------> dreload(math_extra)
    NameError                                 Traceback (most recent call last)


    NameError: name 'math_extra' is not defined
    > <console>(1)?()

Or am I misunderstanding something here?

I'm using IPython 0.6.0.

"We can defeat gravity.  The problem is the paperwork involved."

More information about the IPython-user mailing list