Message88438
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' |
|
Date |
User |
Action |
Args |
2009-05-27 20:01:43 | jaraco | set | recipients:
+ jaraco |
2009-05-27 20:01:43 | jaraco | set | messageid: <1243454503.32.0.886233661759.issue6127@psf.upfronthosting.co.za> |
2009-05-27 20:01:42 | jaraco | link | issue6127 messages |
2009-05-27 20:01:41 | jaraco | create | |
|