Prevent screen flickering/paint over screen

When I use a clear function (that I made so I can use in windows + linux), it flickers the screen, and is unbearable. Im wondering if there is a way to prevent the screen from flickering, or paint over the screen (stackoverflow told me to do this, but I dont know how.)

You are viewing a single comment. View All
Answered by pyelias (2715) [earned 5 cycles]
View Answer
HarperframeInc (456)

When you clear, your adding a bunch of '\n' lines quickly. The computer can't do it instantly, so you have screen flickering. I'm sorry, but I don't think you can fix this.

However, if you want to at least slow the process down, you shouldn't use a while loop and clear at the same time. Slow it down by using time.sleep(seconds).