Notebook: Is there a way to allow an output cell to scroll by its self?

Created on 15 Feb 2016  路  15Comments  路  Source: jupyter/notebook

If I were to do

for i in 1000:
   print i


output cell would scroll downwards by itself.

Question

Most helpful comment

I would really like this feature too! Constantly having to scroll down when printing the progress of an algorithm gets tedious quickly

All 15 comments

@ArEnSc If you ran this code in Python 3 with a Jupyter notebook, you would be able to scroll through the output:

screen shot 2016-02-14 at 5 32 34 pm

I would like it to scroll by it self to the latest printed value is that possible ?

I don't think we have an option to do that. You can probably do it with a notebook extension, but I don't know quite what JS you'd need.

@ArEnSc : We're doing a little housekeeping on our issue log and noticed this thread from 2016. Were you able to find a solution to your issue? Please let us know! We'll close this issue if you found what you need. thanks!

I'd like to add a vote for this issue, with one clarification: it should only scroll if the output is already scrolled down to the bottom.

I often run calculations the produce output over some extended time, maybe printing another line every ten seconds or so. I want to sit and watch the output as it appears. But once it collapses all the output into a scrollable text area, it stops being visible. I can scroll the output down to the bottom, but when the next line appears, it's always hidden off the bottom. So I have to sit there with the mouse hovering over it, ready to scroll it down by hand every ten seconds just so I can see the next line that's just appeared. This gets really irritating!

Of course, I might also want to scroll back through the output and look over it while the code is still running. If it kept jumping back to the bottom, that would also be irritating. So this is the behavior I suggest. If the cell's output is already scrolled to the bottom and new output appears, it should automatically scroll to make that new output visible. If it's scrolled to anywhere other than the bottom, it should remain where it is when new output appears.

And to be clear, I'm talking about scrolling the output of a particular cell. I'm not talking about scrolling the whole window.

Was there ever a solution to this issue?

I agree it would be very useful to lock the output scroll bar to the bottom (most recent output) in order to monitor output as it happens without having to manually scroll to the bottom.

Yeah, I'm looking for a solution to this as well.

I would also really appreciate such a feature. The collapsed output cell should stay at the point where I leave the scrollbar. Unless I scroll to the very bottom, then it should be implicitely assumed that I want it to follow the output (behaving like the -f option in tail, for example)

You can use the scroll_down extenstion from jupyter_contrib_nbextensions to get automatic output cell scroll mechanism.
image

It might be really nice if you could make cell scrolling persistent. Cell scrolling seems to reset to False whenever you restart the kernel.

Based on the code here:

https://github.com/ipython-contrib/jupyter_contrib_nbextensions/blob/master/src/jupyter_contrib_nbextensions/nbextensions/scroll_down/config.yaml

It looks like you can just change the default flag to true from false?

surprised there isn't more support for this! would love this feature

I would really like this feature too! Constantly having to scroll down when printing the progress of an algorithm gets tedious quickly

bump for this feature to be the default! the scroll_down extension repo has 4.3K stars

+1 for such feature

Was this page helpful?
0 / 5 - 0 ratings

Related issues

harshinielath picture harshinielath  路  3Comments

ehossain1982 picture ehossain1982  路  3Comments

arilwan picture arilwan  路  3Comments

fonnesbeck picture fonnesbeck  路  3Comments

md-jamal picture md-jamal  路  3Comments