[IPython-user] ^C does not abort during searches in 0.7

Fernando Perez Fernando.Perez at colorado.edu
Thu Jan 12 14:55:03 CST 2006

Stefan van der Walt wrote:
> On Thu, Jan 12, 2006 at 08:38:32PM +0100, Francesc Altet wrote:
>>A Dijous 12 Gener 2006 20:28, Fernando Perez va escriure:
>>>AH!  I think it's a python 2.4 bug: I tested running the _same ipython_
>>>against python 2.3/2.4, and I see the problem with 2.4.  Ah, it's so nice
>>>when you can punt on a bug and blame it on Guido :)
>>Congratulations ;-) Just in case, first check that there is not a bad
>>interaction between IPython 0.7.0 and Python 2.4. I find strange the
>>fact that the combination Python2.4.2/IPython0.7.0 works as it should
>>when started within a thread.
> What behaviour are we supposed to see?  With 0.6.15 I have reverse
> search, but to cancel it I have to do C-c ENTER (not just C-C like in
> bash).

The extra ENTER is needed only in threaded modes.  This is because of a 
fundamental limitation of the python internals: it is impossible to send 
signals across threads in python.  So I catch the signal, ask the user to hit 
ENTER (so the raw_input can return), and simply flush the buffers so there's 
no execution.  This also means that in a threaded shell, C-C doesn't really 
stop a long-running computation, unfortunately.



More information about the IPython-user mailing list