From: matz@... (Yukihiro Matsumoto) Date: 2003-03-04T18:13:29+09:00 Subject: Re: encountering EOF not at the End Of File Hi, In message "encountering EOF not at the End Of File" on 03/03/04, Meinrad Recheis writes: |i m reading binary files into strings ... | |str = file.read # reads till EOF | |.... and it sometimes happens that str.length is not equal the file |length. so there must be EOF's somewhere in the stream before the actual |end. It should not be happened, unless either a bug or you're reading in text mode on the DOS-ish platform. Try f = open(path, "rb") or f.binmode before reading binary file, if you're on Windows, DOS, etc. matz.