New flags in IPython, of interest to matplotlib users

Hi all,

This was posted to the ipython-dev list, but since it's specifically
for MPL, I figured the cross-list spam would be forgiven.

In IPython SVN, I just added the ability to manually control the pylab
threading backend choice directly from the command line. So for
example if by default you have:

tlon[~]> ipython -pylab --nobanner

In [1]: matplotlib.rcParams['backend']
Out[1]: 'TkAgg'

You can now do this as well:

tlon[~]> ipython -wthread -pylab --nobanner

In [1]: matplotlib.rcParams['backend']
Out[1]: 'WXAgg'

In [2]:
Closing threads... Done.
tlon[~]> ipython -gthread -pylab --nobanner

In [1]: matplotlib.rcParams['backend']
Out[1]: 'GTKAgg'

The feature is fairly simplistic: the -Xthread flags map automatically
to the XAgg backends in MPL, with no more fine-grained choice than
that. We can later look into allowing explicit backend selection if
you really scream for it, but I'd rather keep this simple. This means
that if you don't have the *Agg builds of the GUI backends, you'll
still need to do the backend selection by hand as before (i.e. by
modifying your mpl config file).

This has often been requested and I'd needed it myself on multiple
occasions, so it's finally in.

Cheers,

f

Hurray, mayavi and pylab can now easily live together. Thanks heaps
Fernando.

Ga�l

···

On Wed, Dec 12, 2007 at 01:36:01AM -0700, Fernando Perez wrote:

You can now do this as well:

tlon[~]> ipython -wthread -pylab --nobanner

In [1]: matplotlib.rcParams['backend']
Out[1]: 'WXAgg'