File-like objects for reading zip files?

Levente Sandor nospam at
Mon Jul 2 07:51:22 EDT 2001

wxPython -- -- has a wxZipFSHandler class with FindFirst,
FindNext and OpenFile methods. I hope this will help you.


In article <9hks27$549$1 at>, Greg Landrum says...
>I have a .zip archive containing a very large text file (~2.3 MB compressed,
>~520MB uncompressed).  I'd like to have a file-like object for working with
>this file so that I never need to uncompress it.  In case this isn't clear
>enough, I'd like to be able to do something like this:
>import magiczipthing
>f = magiczipthing.FileLikeObject('','r')
>l = f.readline()
>while l:
>    process_line(l)
>    l = f.readline()
>From my perusal of the docs, it doesn't look like the zipfile module
>supports this type of interaction.
>Is there any way to accomplish this task?

More information about the Python-list mailing list