[issue40591] \r broken in IDLE

2020-05-11 Thread Terry J. Reedy
Terry J. Reedy added the comment: This is known, has been discussed on previous issues (can't find numbers now), and is not a bug. Your code outputs a stream of 21 characters to 'file' sys.stdout, which for code executed by IDLE is, by default, directed to Shell. The effect of outputting Asc

[issue40591] \r broken in IDLE

2020-05-11 Thread wyz23x2
New submission from wyz23x2 : When you run this code: import time for i in range(10): print(f"\r{i}", end='', flush=True) time.sleep(1) print('\n') On CMD it prints 0 at the first time, then it will erase it and print the increased i. But on IDLE it just prints "0123456789" -- that is