I have a Python script and I want to make it display a increasing number from 0 to 100% in the terminal. I know how to print the numbers on the terminal but how can I \"rewr
Based on this answer, but without the terminal controller:
import time import sys for i in range(100): sys.stdout.write("Downloading ... %s%%\r" % (i)) sys.stdout.flush() time.sleep(1)
Tested on GNOME terminal (Linux) and Windows console.
Tip: Don't run this example in IDLE editor.