[IPython-User] vim-ipython: misuse of waitforbuttonpress leaves kernel unresponsive
Paul Ivanov
pivanov314@gmail....
Sat Aug 6 17:45:51 CDT 2011
Jorge Scandaliaris, on 2011-08-06 18:35, wrote:
> I run a file through vim-ipython that uses
> plt.waitforbuttonpress(timeout=0) for showing some matplotlib plots. A
> couple of figures appear, and uppon pressing some key the get updated.
> Accidentally (actually, I used to do this all the time, without any side
> effects, when I wanted to stop for some reason without showing all the
> updates) I just closed the figures and after that I could not interact
> anymore with the ipython kernel, not from vim nor the qtconsole.
> I guess the kernel is left waiting (infinitely) for my key press without
> noticing I just killed the figures. Is there any way, other than
> allowing the script to end by itself, to stop a script running in the
> kernel?
Hi Jorge,
Sounds like you ran into an IPython bug - where stdin is
scheduled around to the different kernel managers instead of
being accepted from any of them:
https://github.com/ipython/ipython/issues/673
The workaround for the time being is to have vim IPython send
stdin message. In vim, do something like
:py km.stdin_channel.input(' ')
best,
--
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: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
Url : http://mail.scipy.org/pipermail/ipython-user/attachments/20110806/1bdfa3ba/attachment.bin
More information about the IPython-User
mailing list