[issue1142] code sample showing errors reading large files with py 2.5/3.0

Guido van Rossum report at bugs.python.org
Mon Sep 10 23:55:29 CEST 2007


Guido van Rossum added the comment:

PythonMeister, what do you mean, "confirmed"? Your read loop ends printing 

('total lines read ', 85014960)

which is the expected output.  (It's one less than the number of lines
written due to a bug in the program -- it prints the 0-based ordinal of
the last line written rather than the total number of lines written,
which is one more. But the bug is the same in the input and output loop.
 Richard's output from the read loop was

('total lines read ', 85014950)

i.e. 10 less than written.

I wonder if the bug is simply a matter of a failure to flush on Windows?
 I can't reproduce it on Linux (Ubuntu dapper).

Richard, can you somehow view the end of the file to see what its last
lines actually are?  It should end like this:

85014951
85014952
85014953
85014954
85014955
85014956
85014957
85014958
85014959
85014960

----------
nosy: +gvanrossum

__________________________________
Tracker <report at bugs.python.org>
<http://bugs.python.org/issue1142>
__________________________________


More information about the Python-bugs-list mailing list