New submission from Jason R. Coombs <jar...@jaraco.com>: Per http://bugs.python.org/issue5265, I'm opening up a new ticket. Universal newline behavior works as expected under Linux but differently under Windows.
PS C:\Users\jaraco> python Python 2.6.2 (r262:71605, Apr 14 2009, 22:40:02) [MSC v.1500 32 bit (Intel)] on win32 >>> import io >>> io.StringIO('foo\r\nbar\r\n', newline=None).read() u'foo\n\nbar\n\n' As you can see, the newlines get duplicated. The problem doesn't seem to be with universal newline support in general, but the StringIO implementation in particular. PS C:\Users\jaraco\projects\formworx> python Python 2.6.2 (r262:71605, Apr 14 2009, 22:46:50) [MSC v.1500 64 bit (AMD64)] on win32 >>> open("testnl.txt", "wb").write("foo\r\nbar\r\n") >>> open("testnl.txt", "rU").read() 'foo\nbar\n' ---------- components: IO messages: 88438 nosy: jaraco severity: normal status: open title: Unexpected universal newline behavior (newline duplication) in Windows versions: Python 2.6 _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue6127> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com