Yea I get it now. I didn't realize that there where other possible
un-implemented compression methods. Fredrik's post enlightened me.
The problem was a false assumption that compression=0 in the arguments
was == False seemed logical that compression=1 was True.
Sometimes things aren't logical till
Fredrik Lundh wrote:
> M.E.Farmer wrote:
>
>>I saw compression=0 and assumed that 1 would mean true, but no!
>>zipfile.ZIP_DEFLATED = 8, defies logic, it is the only compression type
>>why not accept any non zero as compression.
>
> "is the only compression type" ? quoting from the ZIP specifica
Thank you!
"""ZIP_DEFLATED
The numeric constant for the usual ZIP compression method. This
requires the zlib module. No other compression methods are currently
supported."""
That is where I got the 'only compression type'.
It all makes sense now.
Thanks again,
M.E.Farmer
--
http://mail.python
M.E.Farmer wrote:
> I saw compression=0 and assumed that 1 would mean true, but no!
> zipfile.ZIP_DEFLATED = 8, defies logic, it is the only compression type
> why not accept any non zero as compression.
"is the only compression type" ? quoting from the ZIP specification:
compression metho
Steve Holden wrote:
> [EMAIL PROTECTED] wrote:
> > Hello,
> > I following an example on how to zip files from the www.devshed.com
> > site.
> > I can create a zip package, however I am not getting any
compression.
> > 120M file stays 120M within the zip package.
> > I need to know how to set or ac
[EMAIL PROTECTED] wrote:
> Hello,
> I following an example on how to zip files from the www.devshed.com
> site.
> I can create a zip package, however I am not getting any compression.
> 120M file stays 120M within the zip package.
> I need to know how to set or activate the compression values.
> h
zipfile.ZipFile.__init__(self, filename, mode='r', compression=0)
Open the ZIP file with mode read "r", write "w" or append "a".
>import zipfile
>zip = zipfile.ZipFile('', 'w', compression=1)
>zip.write('')
>zip.close()
Warning about zipfile module:
In Python2.2 this is true, maybe 2.3 and 2.
Hello,
I following an example on how to zip files from the www.devshed.com
site.
I can create a zip package, however I am not getting any compression.
120M file stays 120M within the zip package.
I need to know how to set or activate the compression values.
here is the code I'm using:
>import zip