[IPython-user] Killing a hung program
Fernando.Perez at colorado.edu
Thu Jun 16 10:54:35 CDT 2005
Scott Kirkwood wrote:
> I just started using IPython and it looks very interesting.
> But one little problem I have it that occassionally my program will hang or
> take a long time and I want to kill it.
> Unfortunately, under windows (W2K Professional) Ctrl-C doesn't work and
> Ctrl-Break kills the IPython shell as well.
> Can you trap Ctrl-Break in IPython and then send it to the currently running
> program instead?
Well, despite appearances suggesting the contrary, ipython is not (nor
does it claim to be) a true system shell. ipyhton is just a humble
python program, running under the Python runtime VM, with essentially no
signal handling capabilities. Given that:
1. signal handling is one of the trickiest things to get right across
platforms (some say it's impossible to do it in a fully portable way)
2. I'm not in the business of competing with the real system shells
(bash, tcsh, etc.)
I suspect these limitations will unfortunately remain in ipython. If
someone has a lot of energy to sink into writing proper signal handling
into ipython's pysh profile, I'm not opposed to accepting patches for
it. But it's not the avenue I'll follow with my own efforts in the
More information about the IPython-user