[IPython-dev] How to handle extensions

Robert Kern robert.kern at gmail.com
Thu Oct 15 15:58:43 EDT 2009


On 2009-10-15 11:51 AM, Brian Granger wrote:
>
>      > I would really hope that packages wouldn't do that. Even if I have
>      > the package,
>      > I may not want their extensions.
>
>     +1. Two things:
>
>     a) I might not have any use for their package interactively, in which
>     case it has the potential to slow down IPython for me if it's always
>     loading them (less of a problem if they're only loaded on import from
>     the interactive prompt).
>     b) Even if I do use their package interactively, their extensions may
>     not fit my brain.
>
>
> Yes, the the loading of extensions should always be in the control of
> the user.
> Another way of saying this is that an IPython extension should be loaded
> only
> if one of the following happens:
>
> * It is listed in the extensions list of the config file.
> * The user calls %load_ext to load it.
>
> The only case that is different is in the case of something like isympy,
> which is a custom version of ipython that loads various things needed
> by sympy.  But in that case, it is a *different program* that is being run.

* Or it's activated by a profile.

I guess that amounts to calling %load_ext, but I think it's worth breaking out 
as its own item.

-- 
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 IPython-dev mailing list