[IPython-User] ctrl-C question

Fernando Perez fperez.net@gmail....
Wed Sep 7 19:35:48 CDT 2011


Hi Bago,

On Wed, Sep 7, 2011 at 5:08 PM, Bago <mrbago@gmail.com> wrote:
> Hi all,
>     Sorry if this issue has already been discussed, but I can't seem to
> find an answer on google. I have a nasty habit of using ctrl-C to clear
> the prompt when I've typed something and changed my mind or when
> something is taking longer than it should. When I'm using ipython with
> enthought traits, ctrl-C quits me out of ipython session. You can
> imagine how infuriating it is to hit ctrl-C and loose all my work. I
> realize that this problem is not unique to ipython but I'd appreciate
> any help you guys can offer.

Is the problem reproducible with a few lines of code that you can
provide? the following simple tests:

from enthought.traits import api as t
class foo(t.HasTraits):
    x = t.Int()
f = foo()
f.edit_traits()
run ~/scratch/sleeper.py # script that sleeps so I can Ctrl-C


don't seem to show the problem...

It's possible that traits is installing a signal handler in there that
you could override back, but I'd like to see some small example to
reproduce the problem.

Cheers,

f


More information about the IPython-User mailing list