Disable iPython Notebook Autoscrolling
Can also be done via user interface.
- Individual cells: Cell->Current Outputs->Toggle Scrolling
- All cells: Cell->All Outputs->Toggle Scrolling
To disable auto-scrolling, execute this javascript in a notebook cell before other cells are executed:
%%javascript
IPython.OutputArea.prototype._should_scroll = function(lines) {
return false;
}
There is also an ipython notebook extension, disable_autoscroll, you can use for a more permanent change. Follow ipython issue #2172 for the latest details.
To prevent scrolling within a single cell output, select the cell and press Shift+O
while in command state. It will toggle output for that particular cell. If you want all the cells to display long outputs without scrolling, then go to the Cell tab -> All Outputs -> Toggle Scrolling
. That's it !!!
To disable scroll to bottom after run all
command, execute this code:
%%javascript
require("notebook/js/notebook").Notebook.prototype.scroll_to_bottom = function () {}