Message468
Logged In: YES
user_id=145274
It happens on both Unix and Windows, but only with text read.
>>> f = open('foo', 'w')
>>> f.write('abc\r\n')
>>> f.close()
C:\>od -x foo
0000000000 6261 0D63 0A0D
0000000006
C:\>python -c "print open('foo', 'rb').readlines()"
['abc\r\r\n']
C:\>\jython-2.1\jython -c "print open('foo', 'rb').readlines()"
['abc\r\r\n']
C:\>python -c "print open('foo').readlines()"
['abc\r\n']
C:\>\jython-2.1\jython -c "print open('foo').readlines()"
['abc\n', '\n']
$ od -x foo
0000000 6261 0d63 000a
0000005
$ python2 -c "print open('foo', 'rb').readlines()"
['abc\r\n']
$ jython -c "print open('foo', 'rb').readlines()"
['abc\r\n']
$ python2 -c "print open('foo').readlines()"
['abc\r\n']
$ jython -c "print open('foo').readlines()"
['abc\n']
|
|
Date |
User |
Action |
Args |
2008-02-20 17:16:56 | admin | link | issue481404 messages |
2008-02-20 17:16:56 | admin | create | |
|