Storemagic plugin #1073

Merged
merged 4 commits into from Dec 12, 2011

Projects

None yet

3 participants

@takluyver
Member

This makes the storemagic extension a plugin, so there's a configurable option for autorestoring variables on startup (default False).

It also adds a non-configurable default_extensions trait to InteractiveShellApp, for extensions we want to always load as part of IPython. I considered just having a default value for the extensions trait, but I think that's too easy to clobber unintentionally in config, e.g. c.InteractiveShellApp.extensions = ['sympyprinting'].

I think this is a shortcoming of the extension system, that there isn't a simple way to add values to a container - you have to do the little dance with hasattr, and then assign or use extend.

@takluyver
Member

Actually, I'm not completely happy about this. Because extensions are loaded by the application, %store won't be available when it's embedded. I think the always-on extensions should be loaded by the shell.

@fperez
Member
fperez commented Dec 6, 2011

Agreed, those should be shell-level. Do you want to do that here or in a different PR?

@minrk
Member
minrk commented Dec 7, 2011

Related: should extensions just be attached to the InteractiveShell in general, rather than the app? That seems to make more sense.

@fperez
Member
fperez commented Dec 7, 2011

I agree, @minrk.

@minrk
Member
minrk commented Dec 7, 2011

Okay, then if we do move extensions to InteractiveShell from App, there should be a deprecation similar to the one we did for InteractiveShell.prompt_x.

@minrk
Member
minrk commented Dec 12, 2011

opened #1144 for moving extensions to Shell, merging this.

@minrk minrk merged commit d3ded1a into ipython:master Dec 12, 2011
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment