Add drop_by_id method to shell, to remove variables added by extensions. #889

wants to merge 1 commit into

2 participants

IPython member

This was prompted by the revived physics extension. Extensions can drop a lot of variables into the user namespace. Ideally, if the extension is unloaded, those variables should disappear, but only if the names haven't been rebound.

This works as a counterpart to ip.push(). The idea is that an extension can work like this:

myvars = dict(a=foo(), b=bar(), c=baz())

def load_ipython_extension(ip):

def unload_ipython_extension(ip):
IPython member

merged with rebase to avoid recursive merge for just one commit. thx!

@fperez fperez closed this Oct 17, 2011
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment