[IPython-dev] control is not returned to main program, when plotting

Paul Ivanov pivanov314 at gmail.com
Fri Jan 14 05:05:08 EST 2011


Thomas Spura, on 2011-01-14 09:48,  wrote:
> Hi list,
> 
> When running the latest commit of the 0.10.2 branch, the control is not
> returned in -pylab mode.
> 
> e.g. 
> * running ./ipython.py -pylab
> * typing 'plot()'
> * nothing happens
> * typing 'show()'
> * control is not returned, even when closing the window
> 
> This problem is because check_gtk sets interactive to false and returns
> the tkthread backend. But when using -gthread (which is default here),
> everything runs as expected.
> 
> The patch below fixes the problem for me, but do'nt know if it's a
> proper fix.
> 
> (CC'ing the author of commit 3e84e9f446b752aef4c798b3a086084b5cdcb679,
> which is the first bad commit)

Hi Thomas,

this was originally reported in issue 185, and I submitted a pull
request on Dec 28th [**cough** last year! ;) ] to fix
this, coming to the same conclusion as you, which Mark Voorhies
graciously tested and verified that it resolves the issue.

https://github.com/ipython/ipython/pull/237

In the pull request message, I came to the same conclusion as
you:

  What isn't clear to me is the purpose of the function
  check_gtk inside Shell.py, which was added in the problematic
  commit. For some reason, it unconditionally returns mode
  'tkthread' if gtk was safely imported and hasattr
  'set_interactive', regardless of what mode was passed to it.

Your patch is a subset of the lines to be removed by the pull
request. I additionally got rid of the entire check_gtk function
as it was no longer used anywhere.

We just need someone with ipython privileges to put pull it into
the 0.10.2 branch. Anyone lurking out there? :)

-- 
Paul Ivanov
314 address only used for lists,  off-list direct email at:
http://pirsquared.org | GPG/PGP key id: 0x0F3E28F7 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://mail.python.org/pipermail/ipython-dev/attachments/20110114/feaf01b9/attachment.sig>


More information about the IPython-dev mailing list