1

When running the code below on Spyder, part of the code shown on the IPython console disappears (i.e. it auto scrolls too far down)

get_ipython().magic('clear')
for i in range(10): print(i)

But it doesn't happen when I add time.sleep(0.1)

get_ipython().magic('clear')
time.sleep(0.1)
for i in range(10): print(i)

Does anyone know why? (And potentially a way to solve it without slowing down the code)

Mike
  • 102
  • 6
  • I only started getting this issue when I updated from Spyder 3 to Spyder 4. It was very annoying because my code was working perfectly but before it got marked this bizarre error started happening. Did you ever find a solution? – Disgusting Jan 26 '21 at 12:20
  • @Disgusting unfortunately no. The time.sleep(0.1) did the trick but it's unnecessarily time consuming if you are printing inside a loop – Mike Jul 17 '21 at 15:28

0 Answers0