[Python-Dev] zipfile.py

Greg Stein gstein@lyra.org
Thu, 16 Dec 1999 13:32:09 -0800 (PST)


On Thu, 16 Dec 1999, M.-A. Lemburg wrote:
>...
> Some notes on the API:
> ----------------------
> * I would find it more convenient if the filename and mode
> would be constructor parameters, e.g.
> 
> 	zfile = zipfile('myfile.zip','rb')
> 
> with compression defaulting to 8 rather than 0 (most zip files
> will be deflated since this is the ZIP default).
> 
> * Also, I would like a method much like the os.listdir()
> which returns a list of filenames rather than print it
> to stdout.

The above two items were in my ramble, just not as clear as MAL :-)

> * .is_zipfile() should probably be a separate function: it
> doesn't use any of the class' features.

Ah! Good call. It is even more important to shift it out if the
constructor now opens a file.

Cheers,
-g

-- 
Greg Stein, http://www.lyra.org/