[Python-bugs-list] [ python-Bugs-610584 ] readlines will not read the whole file

noreply@sourceforge.net noreply@sourceforge.net
Tue, 17 Sep 2002 07:48:15 -0700


Bugs item #610584, was opened at 2002-09-17 14:48
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=610584&group_id=5470

Category: Windows
Group: Python 2.2.1
Status: Open
Resolution: None
Priority: 5
Submitted By: Wenhua (wezhang)
Assigned to: Tim Peters (tim_one)
Summary: readlines will not read the whole file

Initial Comment:
put the w.jpg file in c:\w.jpg

run the following:

>>>inputfile=open('c:\w.jpg', 'r')
>>>outputfile=open('c:\w2.jpg', 'w')
>>>L=inputfile.readlines()
>>>outputfile=writelines(L)

the w2.jpg will be much samller than the input file w.jpg
w2.jpg ends right before the character x1a.

it also happened in read(n), readline()...

I have install and reinstall python 22 a few times on two 
different computer running windows2000 prof.

under Cygwin the python 2.2.1 works fine, so I think the 
bug only happened  under windows.

please fix it ASAP, I could not find a way to go around 
it.  I try to use python 2.1.3 but it may has the same 
problem.


----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=610584&group_id=5470