[Ipython-tickets] [IPython] #110: ctrl-C behaviour

IPython ipython-tickets@scipy....
Mon Apr 2 02:01:46 CDT 2007


#110: ctrl-C behaviour
---------------------+------------------------------------------------------
 Reporter:  jdpipe   |        Owner:  fperez  
     Type:  defect   |       Status:  reopened
 Priority:  normal   |    Milestone:  0.9.0   
Component:  ipython  |      Version:          
 Severity:  normal   |   Resolution:          
 Keywords:           |  
---------------------+------------------------------------------------------
Comment (by fperez):

 No, the problem is that when threads are present, I can't trap the signals
 at all in the thread where user code is running.

 Furthermore, in a line-oriented program (such as ipython), there is no way
 to clear a previously written line.  Something like that can be done if
 running in a GUI, or even using curses in a terminal, but not in a purely
 line-driven program, since the state of previous lines is gone once
 they've been printed.

 It's a bummer, and this is the main reason why I continue to use Tk as my
 pylab backend (it doesn't need threads because python manages its mainloop
 in a single thread).  But basically, python, multiple threads and
 asynchronous signals are kind of a toxic mix.  I've read a LOT of
 discussions over the years on this problem, and repeatedly all I get from
 core python developers is that there really isn't much that can be done in
 this context.

 I'm always on the lookout for new ideas, so if you know of a possible
 solution for this problem, I'd be delighted to try it out.  But believe
 me, the current situation isn't sub-optimal for lack of trying,
 unfortunately.

-- 
Ticket URL: <http://projects.scipy.org/ipython/ipython/ticket/110#comment:6>
IPython <http://ipython.scipy.org>
The IPython interactive Python system


More information about the Ipython-tickets mailing list