This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author r_mosaic
Recipients r_mosaic
Date 2011-06-15.04:59:51
SpamBayes Score 5.54376e-08
Marked as misclassified No
Message-id <1308113993.07.0.688068575261.issue12337@psf.upfronthosting.co.za>
In-reply-to
Content
Since "-u" is made default and binary stdio implemented in 3.2, many of my scripts cannot run directly in Python 3.2, because they expect "\n" from stdin, but on Windows "\r\n" is got.

Since that binary stdio being default is necessary for features like CGI, what I am expecting is to get a real TextIOWrapper for stdin, so that I can still use my old code. Besides, type(sys.stdio) should no longer say TextIOWrapper, because TextIOWrapper implies the conversion from "\r\n" to "\n".

Steps to reproduce:
In Python 3.2:
>>> import sys
>>> type(sys.stdin)
<class '_io.TextIOWrapper'>
>>> sys.stdin.readline()
a
'a\r\n'
>>> type(sys.stdout)
<class '_io.TextIOWrapper'>

Expected result:
There should be some form of text support, such as textstream(sys.stdin).readline(). Also type(sys.stdin) should not say something like "TextIOWrapper". Same for sys.stdout.
History
Date User Action Args
2011-06-15 04:59:53r_mosaicsetrecipients: + r_mosaic
2011-06-15 04:59:53r_mosaicsetmessageid: <1308113993.07.0.688068575261.issue12337@psf.upfronthosting.co.za>
2011-06-15 04:59:52r_mosaiclinkissue12337 messages
2011-06-15 04:59:52r_mosaiccreate