Zipfile content reading via an iterator?
Gabriel Genellina
gagsl-py2 at yahoo.com.ar
Tue Dec 11 19:03:54 EST 2007
En Tue, 11 Dec 2007 17:14:14 -0300, Tim Chase
<python.list at tim.thechases.com> escribi�:
> I'm dealing with several large items that have been zipped up to
> get quite impressive compression. However, uncompressed, they're
> large enough to thrash my memory to swap and in general do bad
> performance-related things. I'm trying to figure out how to
> produce a file-like iterator out of the contents of such an item.
The Time Machine in action again - that's already done, but in SVN. You
want the new ZipFile.open(filename) method, which returns a file-like
object.
Either wait until the 2.6 release, or get the zipfile.py source from
http://svn.python.org/view/python/trunk/Lib/zipfile.py and see if it works
with the current 2.5 release. (I think it should work OK)
--
Gabriel Genellina
More information about the Python-list
mailing list