When I write a script that updates a printed line, for example like this:
for i in range(101): print(str(i) + \"% \\r\", end=\"\")
and run
This is because 'print' always generates a new line whenever you use \r or not, try sys.stdout instead:
import time, sys for i in range(101): sys.stdout.write(str(i) + "% \r") sys.stdout.flush() time.sleep(.3)