Issue 11278: raw_input() and input() not stripping EOL on win32

Issue11278

Created on 2011-02-22 00:47 by Dave.Flogeras, last changed 2022-04-11 14:57 by admin. This issue is now closed.

Messages (3)
msg129017 - (view) Author: Dave Flogeras (Dave.Flogeras) Date: 2011-02-22 00:47
From the python prompt, raw_input() (2.7.1) and input (3.2.0) behave as documented (they strip the trailing EOL chars)

However the two line test program:
x = raw_input() # or input() in 3.2.x
print( repr( x ))

And then run from the command line prompt, .\test.py, shows 'mytest\r' including the EOL char.
msg129018 - (view) Author: Brian Curtin (brian.curtin) * (Python committer) Date: 2011-02-22 00:48
Duplicate of #11272.
msg129020 - (view) Author: Dave Flogeras (Dave.Flogeras) Date: 2011-02-22 00:50
Ok, I'm actually not sure of what I just said.  I might not be running the version I think I am, since windows behaves differently when using a program started with extensions vs. started with python.  It might actually be that Python 2.7 is correct, but 3.2 is not.
History
Date User Action Args
2022-04-11 14:57:13adminsetgithub: 55487
2011-02-22 00:50:08Dave.Flogerassetmessages: + msg129020
2011-02-22 00:48:01brian.curtinsetstatus: open -> closed

nosy: + brian.curtin
messages: + msg129018

resolution: duplicate
stage: resolved

2011-02-22 00:47:04Dave.Flogerascreate