[IPython-User] ctrl-C question

Bago mrbago@gmail....
Wed Sep 7 19:53:55 CDT 2011


this is enough to do it for me:

from enthought.traits import api as t
class foo(t.HasTraits):
   x = t.Int()
f = foo()
f.configure_traits()

if I ctrl-C when the configure_traits window is open, or close out of it and
hit ctrl-C ipython quits.

Bago

On Wed, Sep 7, 2011 at 5:35 PM, Fernando Perez <fperez.net@gmail.com> wrote:

> 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
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.scipy.org/pipermail/ipython-user/attachments/20110907/b0b48e5a/attachment-0001.html 


More information about the IPython-User mailing list