[SciPy-user] interactive work with extension modules

Robert Kern robert.kern@gmail....
Mon Aug 4 10:26:39 CDT 2008

On Mon, Aug 4, 2008 at 10:04, Steve Schmerler <elcorto@gmx.net> wrote:
> Hi all
> I've read in the scipy and IPython archives that Python cannot reload extension
> modules (C and Fortran). So if I change and re-compile my extension and do
>    >>> reload(foo)
>    >>> foo.some_function(args)
> in the [i]python shell, there is no change to "foo". Even
>    >>> del foo
>    >>> import foo
>    >>> foo.some_function(args)
> does not change the module foo in the interactive session (why?). So, I'd like
> to hear how people develop/test extensions interactively, then.

By and large, you have to use a new process. Python extension modules
don't really have the capability to be unloaded. Consequently, they
can't really be reloaded, either.

Robert Kern

"I have come to believe that the whole world is an enigma, a harmless
enigma that is made terrible by our own mad attempt to interpret it as
though it had an underlying truth."
 -- Umberto Eco

More information about the SciPy-user mailing list