Message47752
I originally started working on updating patch 992750,
but decided after a short while to just start from
scratch, so I'm posting it as a new patch. Sorry if
this isn't appropriate.
This patch provides a new open() method on ZipFile;
this method returns a file-like object for the
requested item in the archive. This file-like object
only provides a read() method.
ZipFile.read was modified to use the new open method
(this was suggested by loewis in reference to patch
992750).
The patched zipfile.py passed the existing tests in the
test_zipfile.py from CVS. New tests were added to
verify the operation of the object returned by open().
These tests were modeled after existing tests for
ZipFile.read(); two read fixed-size chunks from the
file-like object, and two others read random-sized chunks.
I have only run the tests on Windows XP, using
Python2.4 from the official Windows installer. I will
test the patch out on Linux over the weekend.
If the patch is accepted I'll also generate and submit
patches for the appropriate documentation as well. |
|
Date |
User |
Action |
Args |
2007-08-23 15:41:47 | admin | link | issue1121142 messages |
2007-08-23 15:41:47 | admin | create | |
|