From 07fb0057750d53091af8c219457db9d4d27b97ca 2011-07-01 09:42:30 From: Jens Hedegaard Nielsen Date: 2011-07-01 09:42:30 Subject: [PATCH] Enable pylab now takes import_all kwarg --- diff --git a/IPython/core/interactiveshell.py b/IPython/core/interactiveshell.py index ae26453..c1b6242 100644 --- a/IPython/core/interactiveshell.py +++ b/IPython/core/interactiveshell.py @@ -2416,7 +2416,7 @@ class InteractiveShell(SingletonConfigurable, Magic): # Things related to GUI support and pylab #------------------------------------------------------------------------- - def enable_pylab(self, gui=None): + def enable_pylab(self, gui=None, inport_all=True): raise NotImplementedError('Implement enable_pylab in a subclass') #------------------------------------------------------------------------- diff --git a/IPython/frontend/terminal/interactiveshell.py b/IPython/frontend/terminal/interactiveshell.py index a7cdf38..292aa5f 100644 --- a/IPython/frontend/terminal/interactiveshell.py +++ b/IPython/frontend/terminal/interactiveshell.py @@ -417,7 +417,7 @@ class TerminalInteractiveShell(InteractiveShell): # Things related to GUI support and pylab #------------------------------------------------------------------------- - def enable_pylab(self, gui=None): + def enable_pylab(self, gui=None, import_all=True): """Activate pylab support at runtime. This turns on support for matplotlib, preloads into the interactive @@ -440,7 +440,7 @@ class TerminalInteractiveShell(InteractiveShell): # code in an empty namespace, and we update *both* user_ns and # user_ns_hidden with this information. ns = {} - gui = pylab_activate(ns, gui) + gui = pylab_activate(ns, gui, import_all) self.user_ns.update(ns) self.user_ns_hidden.update(ns) # Now we must activate the gui pylab wants to use, and fix %run to take