Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Prevent Jupyter screen from jumps down after cell evaluation

Whenever i evaluate a cell (Shift+Enter) jupyter moves the screen down so that the output is shown, assuming the cell is to big to fit on the screen entirely. I find this feature rather annoying as it jumps so fast that i sometimes lose track where i just was when debugging.

Is there a way to modify this behavior or to disable automated screen adjustments entirely?

I use a standard jupyter installation without any modifications.

The version of the notebook server is: 5.2.0 The server is running on this version of Python: Python 3.5.4rc1 (default, Jul 25 2017, 08:53:34) [GCC 6.4.0 20170704]

Current Kernel Information:
Python 3.5.4rc1 (default, Jul 25 2017, 08:53:34)

like image 908
465b Avatar asked Nov 02 '17 17:11

465b


People also ask

What does %% capture do Jupyter?

Capturing Output With %%capture IPython has a cell magic, %%capture , which captures the stdout/stderr of a cell. With this magic you can discard these streams or store them in a variable. By default, %%capture discards these streams. This is a simple way to suppress unwanted output.

How do I keep my JupyterLab running?

This can be done by typing jupyter notebook in the terminal, which will open a browser. Then, navigate to the respective jupyter notebook file in the browser and open it. Click Cell > Run All on the toolbar. All done!

Does Jupyter Notebook keep running after closing browser tab?

TL;DR: Code doesn't stop on tab closes, but the output can no longer find the current browser session and loses data on how it's supposed to be displayed, causing it to throw out all new output received until the code finishes that was running when the tab closed.


1 Answers

The Shift+Enter command is run cell, select cell below, so if you are debugging a cell this is probably not what you want. If you use Ctrl + Enter, that is just run cell and should not move your cell cursor.

This may be what is causing your issue, as jumping to the next cell would also show you your output, misleading you on the cause of your issue. Using Ctrl + Enter in my 5.2 notebook does not move my screen position at all.

like image 126
Louise Davies Avatar answered Sep 21 '22 16:09

Louise Davies