[Python-bugs-list] [Bug #112759] open('file').read() can not read entire binary file

noreply@sourceforge.net noreply@sourceforge.net
Fri, 25 Aug 2000 17:25:42 -0700


Bug #112759, was updated on 2000-Aug-25 17:25
Here is a current snapshot of the bug.

Project: Python
Category: Core
Status: Open
Resolution: None
Bug Group: None
Priority: 5
Summary: open('file').read() can not read entire binary file

Details: I have a binary data file "myfile.dat"  with file length 26360 bytes.
when doing
>>>f=open("myfile.dat")
>>>data = f.read()
>>>len(data)
3325

This is repeatable on most of (little) big binary files.
I guess it is because some binary pattern in the file interrupts the reading.
I tried with JPython, it works fine there. Probably that is using java's file-IO

Jianchi Wei

For detailed info, follow this link:
http://sourceforge.net/bugs/?func=detailbug&bug_id=112759&group_id=5470