Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I tell if IPython is running?

I have an IPython notebook. I have a long-running loop that produces no output in one of the code blocks. It's not this, but imagine it was this:

for i in range(100):     time.sleep(2) 

I started the code block running a while ago, and now I can't tell whether it's finished, or whether it's still running.

All the IPython status bar says at the top is Last Checkpoint: 23 minutes ago (autosaved). There's nothing in the browser tab to show whether it's running code, either.

I don't want to start the next block because I don't know if this block has finished.

And I don't want to stop the kernel and add print statements to this block, because if it's 80% of the way through, I don't want to kill it and restart it!

Is there anything in IPython - either the browser window or the console - that indicates what code is running right now?

like image 785
Richard Avatar asked Aug 31 '15 20:08

Richard


People also ask

How do I run IPython?

You start IPython by typing “ipython” in your terminal. $ ipython Python 2.7. 2 (default, Jun 20 2012, 16:23:33) Type "copyright", "credits" or "license" for more information. IPython 0.13.

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 .

Is Jupyter Notebook same as IPython?

The IPython Notebook is now known as the Jupyter Notebook. It is an interactive computational environment, in which you can combine code execution, rich text, mathematics, plots and rich media. For more details on the Jupyter Notebook, please see the Jupyter website.

How do I run IPython in Visual Studio?

Select the Overview tab and select Use IPython interactive mode. (In Visual Studio 2015, select Configure interactive options to open the Options dialog, then set Interactive Mode to IPython, and select OK). Select Open interactive window to bring up the Interactive window in IPython mode.


1 Answers

  1. You can see whether code still being executed or not in three places, In the top right corner, there will small circle which stays solid till the execution of code completes.

enter image description here

  1. Every cell will have cell number but when that cell being executed it will show * instead of a number

enter image description here

  1. In chrome and firefox browsers tabs icon changes from notebook to a clock.

enter image description here

like image 168
Praveena Avatar answered Sep 19 '22 15:09

Praveena