[IPython-dev] Extensions: decisions on loading them and API (thoughts from R. Kern's branch)

Ville M. Vainio vivainio@gmail....
Mon Mar 16 16:33:43 CDT 2009


On Mon, Mar 16, 2009 at 11:01 PM, Barry Wark <barrywark@gmail.com> wrote:

> +1 on making extension loading and importing more explicit. I think

> bundle contexts) in the future. We could ease the transition, perhaps,
> by adding a startup flag that, if set, will monkey-patch sys.path as
> is done now. Again, forcing this behavior to be explicitly requested
> is a good idea.

sys.path manipulation is just a convenience mechanism to make all the
extensions appear in the same namespace (global modules, starting with
ipy_). So, if you have plugins installed by 5 different packages, you
could see all of them by entering "import ipy_<TAB>", without digging
through package source trees for them.

However, I'm done with defending the scheme. If it has to go down, it
has to go down, and I can personally add the feature back by having it
in my ipy_user_conf.py..


> More broadly, extensions might be viewed as a plugin system. Is there
> any will towards incorporating one of the many python plugin systems
> instead of rolling our own? I don't know the core very well, so there
> could easily be good reasons against such an approach.

The existing plugin systems seem a bit overengineered for ipythons purpose.

What we need are addition of unload and unset_hook. I don't know how
much people really wont to unregisters plugin, but it might come in
handy down the road.

-- 
Ville M. Vainio
http://tinyurl.com/vainio


More information about the IPython-dev mailing list