[SciPy-User] How to make sure that a module gets re-loaded
Pauli Virtanen
pav at iki.fi
Sun Oct 25 06:51:15 EDT 2009
la, 2009-10-24 kello 23:58 +0200, Gaetan Cesar Koers kirjoitti:
> How to make sure that a module gets re-loaded when I've edited it's
> source code?
>
> I thought that either 'import' or 'reload' could do this, but I have the
> idea that only a cold shell restart helps.
>
> The time I've lost by chasing a bug that afterwards proves to be a
> remnant of a previous module version!
If it's a pure-python module, for which reload() works, you can automate
reloading by using IPython and doing
import ipy_autoreload
%autoreload 2
See also
%autoreload?
%aimport?
--
Pauli Virtanen
More information about the SciPy-User
mailing list