On 9 March 2018 at 17:46, Rob Gaddi <rgaddi@highlandtechnology.invalid> wrote: > On 03/08/2018 07:57 PM, Steven D'Aprano wrote: >> >> [snip] >> >> But it is possible that due to differences between platforms, the >> OP's version of IDLE doesn't display a carriage return as \r but >> rather as an invisible zero-width space. >> > > Just to derail this conversation a bit, does anyone have a use case in the > modern (Py3) age for '\r'? I use b'\r' fairly regularly when talking to > serial port devices. But the string version?
It's fairly common for backing up and rewriting a progress line in simple console programs: for i in range(100): print(f"\r \rCompleted: {i}%", end='') sleep(0.5) Paul -- https://mail.python.org/mailman/listinfo/python-list