Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can I stop execution of current module in ipython without leaving ipython

Tags:

ipython

I'd like to break out of the currently running program and be dropped back to the shell (without having to restart ipython)

like image 826
DanB Avatar asked Aug 27 '11 13:08

DanB


People also ask

How do you stop a running cell in Jupyter?

Stopping a process or restarting a Jupyter Notebook To interrupt a cell execution, you can click the ■ “stop” button in the ribbon above the notebook, or select “Interrupt Kernel” from the Kernel menue.

How do I turn off IPython in CMD?

NOTE: You can also shutdown a Jupyter Notebook session by clicking in the Terminal window and clicking Ctrl+c . You will be asked to confirm that you want to Shutdown this notebook server (y/[n])? . Type y and hit Enter to confirm. Then, you can close the Terminal by typing the command exit and hitting Enter .

How do I interrupt kernel Jupyter?

To interrupt a calculation which is taking too long, use the Kernel, Interrupt menu option, or the i,i keyboard shortcut. Similarly, to restart the whole computational process, use the Kernel, Restart menu option or 0,0 shortcut.


1 Answers

I had the same issue after reinstalling console2 and ipython on Windows. If you use the ipython.exe launcher, this seems to be a problem and it just closes the whole window. However, if you instead launch ipython with

python C:\python27\scripts\ipython-script.py

then it catches and handles the KeyboardInterrupt just fine and leaves me at the ipython prompt. Hooray.

like image 200
partofthething Avatar answered Oct 09 '22 05:10

partofthething