Patches item #992750, was opened at 2004-07-17 02:45
Message generated for change (Comment added) made by alanmcintyre
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=305470&aid=992750&group_id=5470
Category: Library (Lib)
Group: Python 2.3
Status: Open
Resolution: None
Priority: 5
Submitted By: Keyphrene (keyphrene)
Assigned to: Nobody/Anonymous (nobody)
Summary: zipfile and big zipped file
Initial Comment:
read method decompress the zipped files, but this
method returns bytes, more the file is big, more the
bytes array is big. readFile method allows to send the
bytes in a file.
----------------------------------------------------------------------
Comment By: Alan McIntyre (ESRG) (alanmcintyre)
Date: 2005-02-09 17:29
Message:
Logged In: YES
user_id=1115903
The current behavior of ZipFile.read is an occasional
annoyance for me. I will make the changes described in
loewis' comments and submit the updated patch, unless
somebody is already working on it.
----------------------------------------------------------------------
Comment By: Martin v. L�wis (loewis)
Date: 2004-08-18 08:13
Message:
Logged In: YES
user_id=21627
The patch is unacceptable in its current form. It duplicates
too much code; read and readfile should really share the
common code (e.g. by read falling back to readfile).
Also, as this really copies the data to fileobj, it probably
is better called copyfile, instead of readfile.
Finally, I would much prefer if zipfile would have an .open
method, returning a file-like object. Then you would have
such implementations
def read(self, name):
return self.open(name, "r").read()
def readfile(self, name, dest):
import shutil
shutil.copyfileobj(self.open(name,"r"), dest)
I would then probably leave the last method out, and
encourage users to invoke shutil.copyfileobj directly if
desired.
Are you willing to make changes in this direction?
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=305470&aid=992750&group_id=5470
_______________________________________________
Patches mailing list
[email protected]
http://mail.python.org/mailman/listinfo/patches