New submission from Fan Decheng <fandech...@gmail.com>: 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. ---------- components: IO messages: 138356 nosy: r_mosaic priority: normal severity: normal status: open title: Need real TextIOWrapper for stdin/stdout type: behavior versions: Python 3.2 _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue12337> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com