[IPython-dev] ctrl-c bug using -gthread on windows, with possible solution
Pieter Cristiaan de Groot
p.c.degroot at tudelft.nl
Tue Feb 3 18:47:59 EST 2009
What I forgot to mention is that because of this IOError, threading dies.
Pieter
Pieter Cristiaan de Groot wrote:
> Dear all,
>
> running ipython 0.9.1 on windows using -gthread gives problems using
> ctrl-c. It gives an IOError when ctrl-c is pushed during the sleep(0.01)
> (File: Shell.py line 835-843), otherwise everyghing goes ok. This does
> not happen on a linux machine.
>
> Here's the code:
>
> def on_timer(self):
> """Called when GTK is idle.
> Must return True always, otherwise GTK stops calling it"""
>
> update_tk(self.tk)
> self.IP.runcode()
> time.sleep(0.01)
> return True
>
> Replacing the bottom part with this seems to solve it:
>
> try:
> update_tk(self.tk)
> self.IP.runcode()
> time.sleep(0.01)
> return True
> except IOError, e:
> return True
>
>
>
> I hope this helps,
>
> Pieter
> _______________________________________________
> IPython-dev mailing list
> IPython-dev at scipy.org
> http://lists.ipython.scipy.org/mailman/listinfo/ipython-dev
>
More information about the IPython-dev
mailing list