[IPython-dev] Next PyGtk is going to rock the pylab

Ondrej Certik ondrej@certik...
Wed Sep 17 17:03:05 CDT 2008

On Wed, Sep 17, 2008 at 9:29 AM, Ville M. Vainio <vivainio@gmail.com> wrote:
> Once the "bleeding edge" of pygtk is released, we will have a pylab
> gtk backend that is as stable and simple as the Tk backend. I.e. no
> more threading woes.
> I'd like to draw everyone's attention to the discussion in this bug report:
> https://bugs.launchpad.net/ipython/+bug/270856

This is what I got:


Launchpad is offline for scheduled maintenance. We should be back soon.

For more about Launchpad's maintenance schedule, check Launchpad News.

Thanks for your patience.

> All that is needed to create the single threaded gtk matplotlibshell
> is this (note that it does not use "gui specific" shell, just the
> launcher code is gui specific - it uses the plain vanilla
> IPython.Shell.IPShellMatplotlib()):
> #!/usr/bin/env python
> # -*- coding: utf-8 -*-
> """ Launch matplotlibshell using gtk """
> import gtk,gobject
> import IPython.Shell
> live = False
> def run_ipython():
>    global live
>    if live:
>        return False
>    live = True
>    shell = IPython.Shell.IPShellMatplotlib()
>    IPython.Shell.hijack_gtk()
>    shell.mainloop()
> gobject.idle_add(run_ipython)
> # the following line does not work on current pygtk
> #gtk.set_interactive(True)
> gtk.main()

This is exciting. So where was the problem previously and how was it
fixed? (if it's in the bug that I failed to access, just one or two
senteces are enough:).


More information about the IPython-dev mailing list