Zipfile content reading via an iterator?

Tim Chase python.list at tim.thechases.com
Wed Dec 12 10:03:12 EST 2007


Gabriel Genellina wrote:
>> 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.

Thanks!  I'll give the 2.6 version a try.

As a side question, is there any catalog of Time Machine items 
(instances where folks have asked for a feature only to have the 
response be "it's already implemented in the development 
version")?  I've seen the Time Machine response several times on 
c.l.p and it would be interesting to thumb through an archive of 
the developers prescience.

-tkc

(sorry if this comes through twice...experienced some mailer 
problems)



More information about the Python-list mailing list