Is there an equivalent of CTRL + C in IPython Notebook in Firefox to split cells that are running?

I started using IPython Notebook and enjoy it. Sometimes I write buggy code that requires huge memory needs or has an infinite loop. I believe that the "kernel interrupt" option is sluggish or unreliable, and sometimes I have to restart the kernel, losing everything in memory.

I also sometimes write scripts that cause OS X to run out of memory, and I have to perform a hard reboot. I am not 100% sure, but when I wrote such errors before and ran Python in the terminal, I can usually use CTRL + C for my scripts.

I am using Anaconda for IPython distribution with Firefox on Mac OS X.

+45
python ipython ipython-notebook
Jul 10 '13 at 1:48
source share
5 answers

I may be wrong, but I'm sure the kernel interrupt button just sends a SIGINT signal to the code you are currently using (this idea is supported by the Fernando comment here ), it is the same as pressing CTRL + C. Some processes in python process SIGINT more sharply than others.

If you desperately need to stop something that works on the iPython Notebook and you start iPython Notebook from a terminal, you can press CTRL + C twice on that terminal to terminate the entire iPython Notebook server. This will stop the iPython alltogether laptop, which means that you won’t be able to restart or save your work, so this is obviously not a good solution (you need to press CTRL + C twice because this is a safety feature so people don’t do it by accident ) However, in an emergency, it usually kills the process faster than the kernel shutdown button.

+29
Jul 10 '13 at 5:40
source share

You can press I twice to interrupt the kernel.

+27
Jul 06 '16 at 16:55
source share

Here are the shortcuts for the IPython Notebook.

Ctrl-m i terminates the kernel. (that is, the only letter I am after Ctrl-m )

According to the answer, I also works.

+1
Dec 12 '16 at 21:55
source share

To add to the above: If the interrupt does not work, you can restart the kernel.

Go to the kernel dropdown menu → restart → restart and clear output. This usually does the trick. If this still does not work, start the kernel in the terminal (or task manager), and then restart.

Interruption does not work well for all processes. I have a particular problem using the R kernel.

+1
Jan 12 '17 at 15:47
source share

Inside jupyter, press "esc" to enter evacuation mode. Then double-click "i" to stop the running script.

+1
Nov 11 '17 at 22:55
source share



All Articles