From b243e8a2f4211e1131606223a6087f6091aa5cc3 2010-03-30 17:52:22 From: Benjamin Ragan-Kelley Date: 2010-03-30 17:52:22 Subject: [PATCH] added default behavior, to allow for unhandled backends, such as 'MacOSX' --- diff --git a/IPython/lib/pylabtools.py b/IPython/lib/pylabtools.py index 73a27cf..7149746 100644 --- a/IPython/lib/pylabtools.py +++ b/IPython/lib/pylabtools.py @@ -64,7 +64,7 @@ def pylab_activate(user_ns, gui=None, import_all=True): # In this case, we need to find what the appropriate gui selection call # should be for IPython, so we can activate inputhook accordingly b2g = dict(zip(g2b.values(),g2b.keys())) - gui = b2g[backend] + gui = b2g.get(backend, None) # We must set the desired backend before importing pylab matplotlib.use(backend)