From e54be07d6bfe666eeb98c0ba1857f9ba93692394 2014-03-10 16:59:47 From: Thomas Kluyver Date: 2014-03-10 16:59:47 Subject: [PATCH] Fix local import of select_figure_formats. Fixes issue with setting InlineBackend.figure_format config value, reported on mailing list. --- diff --git a/IPython/kernel/zmq/pylab/config.py b/IPython/kernel/zmq/pylab/config.py index d7eaa3a..0f2d4d2 100644 --- a/IPython/kernel/zmq/pylab/config.py +++ b/IPython/kernel/zmq/pylab/config.py @@ -71,10 +71,10 @@ class InlineBackend(InlineBackendConfig): def _update_figure_formatters(self): if self.shell is not None: + from IPython.core.pylabtools import select_figure_formats select_figure_formats(self.shell, self.figure_formats, **self.print_figure_kwargs) def _figure_formats_changed(self, name, old, new): - from IPython.core.pylabtools import select_figure_formats if 'jpg' in new or 'jpeg' in new: if not pil_available(): raise TraitError("Requires PIL/Pillow for JPG figures")