Message11882
I hate it when I goof up. But, readline() does not work correctly when seek is used.
I updated my test script to better display the info, and to allow people to pass size and the seek amount to the function. it ended up clearly showing Iin the seekboth function, this:
Output:
File position from read(): 1024
File position from readline(): 4202
Amount to seek back: -1024
New position in file: 3278
Wrong position
The function returns the correct position in Python 2.7.12
But, really, readline() *should* only read the line to the newline, which is 101 (test.log shows the first line as 100 '.' with a newline.) This is verified by the seekreadline call in the test file. |
|
Date |
User |
Action |
Args |
2018-04-06 13:51:09 | psykiatris | set | messageid: <1523022669.27.0.682650639539.issue2363@psf.upfronthosting.co.za> |
2018-04-06 13:51:09 | psykiatris | set | recipients:
+ psykiatris, fwierzbicki, zyasoft, tuck182, santa4nt, amit |
2018-04-06 13:51:09 | psykiatris | link | issue2363 messages |
2018-04-06 13:51:08 | psykiatris | create | |
|