classification
Title: Malfunctioning of '\r'
Type: behavior Stage: resolved
Components: IDLE Versions: Python 3.10
process
Status: closed Resolution: duplicate
Dependencies: Superseder: IDLE: Document how Shell displays user code output
View: 23220
Assigned To: ezio.melotti Nosy List: Dora, ezio.melotti, terry.reedy
Priority: normal Keywords:

Created on 2020-05-21 09:17 by Dora, last changed 2020-05-22 08:40 by terry.reedy. This issue is now closed.

Files
File name Uploaded Description Edit
error Dora, 2020-05-21 09:17 The description is given in the comment.
error Dora, 2020-05-21 09:18 The description is given in the comment.
Messages (4)
msg369508 - (view) Author: Dora (Dora) Date: 2020-05-21 09:17
The escape sequence '\r' (carriage return) doesn't function in 3.x and 2.x versions.
Eg:
print("computer\rscience")
Expected output : sciencer
But, it displays computerscience without the functioning of'\r'
msg369509 - (view) Author: Dora (Dora) Date: 2020-05-21 09:18
The escape sequence '\r' (carriage return) doesn't function in 3.x and 2.x versions.
Eg:
print("computer\rscience")
Expected output : sciencer
But, it displays computerscience without the functioning of'\r'
msg369516 - (view) Author: Ezio Melotti (ezio.melotti) * (Python committer) Date: 2020-05-21 09:52
The behavior of \r depends on the operating system and terminal you are using, and not on Python itself.
msg369568 - (view) Author: Terry J. Reedy (terry.reedy) * (Python committer) Date: 2020-05-22 08:40
Discussed on #23220.  Note that 'sciencecomputer' is a different possible result if \r does not switch the simulated terminal from the normal insert mode to overwrite mode.  I am considering terminal simulation as an option, but there is not exactly a standard to emulate.
History
Date User Action Args
2020-05-22 08:40:44terry.reedysetversions: + Python 3.10, - Python 3.5, Python 3.6, Python 3.7, Python 3.8
2020-05-22 08:40:35terry.reedysetsuperseder: IDLE: Document how Shell displays user code output
resolution: not a bug -> duplicate
messages: + msg369568
2020-05-21 09:52:16ezio.melottisetstatus: open -> closed

type: performance -> behavior
assignee: terry.reedy -> ezio.melotti

nosy: + ezio.melotti
messages: + msg369516
resolution: not a bug
stage: resolved
2020-05-21 09:18:37Dorasetfiles: + error

messages: + msg369509
2020-05-21 09:17:19Doracreate