From 058ac4f3ce417d92fc4165b562d07949f0c92168 2013-07-17 04:13:21 From: MinRK Date: 2013-07-17 04:13:21 Subject: [PATCH] update enable_pylab, etc. for inprocess kernel --- diff --git a/IPython/kernel/inprocess/ipkernel.py b/IPython/kernel/inprocess/ipkernel.py index 73d5955..e2d0405 100644 --- a/IPython/kernel/inprocess/ipkernel.py +++ b/IPython/kernel/inprocess/ipkernel.py @@ -160,19 +160,23 @@ class InProcessInteractiveShell(ZMQInteractiveShell): #------------------------------------------------------------------------- def enable_gui(self, gui=None): - """ Enable GUI integration for the kernel. - """ + """Enable GUI integration for the kernel.""" from IPython.kernel.zmq.eventloops import enable_gui if not gui: gui = self.kernel.gui - enable_gui(gui, kernel=self.kernel) + return enable_gui(gui, kernel=self.kernel) + + def enable_matplotlib(self, gui=None): + """Enable matplotlib integration for the kernel.""" + if not gui: + gui = self.kernel.gui + return super(InProcessInteractiveShell, self).enable_matplotlib(self, gui) def enable_pylab(self, gui=None, import_all=True, welcome_message=False): - """ Activate pylab support at runtime. - """ + """Activate pylab support at runtime.""" if not gui: gui = self.kernel.gui - super(InProcessInteractiveShell, self).enable_pylab(gui, import_all, + return super(InProcessInteractiveShell, self).enable_pylab(gui, import_all, welcome_message) InteractiveShellABC.register(InProcessInteractiveShell)