1

I have a notebook that is going to print off hundreds of lines. Is there anyway to have the next line print above the last one?

As in:

Output_n    
...
Output 2
Output 1

Instead of:

Output1
Output2
...
Output_n
DataSwede
  • 5,251
  • 10
  • 40
  • 66

1 Answers1

0

Kind of! from IPython.display import clear_output, then calling clear_output() will clear everything. Then you reprint everything starting from Output_n. It's... not ideal.

Here's a link.

U2EF1
  • 12,907
  • 3
  • 35
  • 37
  • That's kind of unfortunate. Your answer was correct, but wouldn't work in my case. I'm looking to have each character on the printed line appear to be typed slowly- like http://www.google.com/trends/hottrends/visualize?nrow=5&ncol=5&pn=p1 The closest I've gotten is to just reset the line like- http://stackoverflow.com/questions/465348/how-can-i-print-over-the-current-line-in-a-command-line-application – DataSwede Jun 26 '14 at 21:14
  • I mean, you can output javascript directly, so that's definitely doable. – U2EF1 Jun 26 '14 at 21:24
  • Yeah, but that requires me to know javascript... Do you know of any good examples that can be used as a tutorial of sort to make what I'm looking for? – DataSwede Jun 26 '14 at 22:15