[Zope] Problem with zipping file
Vid B
zoops4@yahoo.com
Fri, 13 Jul 2001 09:06:56 -0700 (PDT)
Hi,
This should be simple, but never in my case.
I want to zip pdf file. I am calling an external
python file using dtml method. Here is file.py code
************************************************
def testzlib():
import zipfile
import glob, os
import zlib
# open the zip file for writing, and write stuff to
it file =
zipfile.ZipFile("/usr/local/dc/Zope-2.3.0-src/pdffiles/test1.zip",
"w")
for name in glob.glob("/usr/local/dc/Zope-2.3.0-src/
Extensions/img/*"):
file.write(name, os.path.basename(name),
zipfile.ZIP_DEFLATED)
file.close()
*******************************************************
I am getting following error message
Error Type: AttributeError
Error Value: Z_DEFAULT_COMPRESSION
I replaced Z_DEFAULT_COMPRESSION with 6, and got this
error
Error Type: AttributeError
Error Value: crc32
I am using python1.5.2 and Zope2.3.0
Thanks
Vid
__________________________________________________
Do You Yahoo!?
Get personalized email addresses from Yahoo! Mail
http://personal.mail.yahoo.com/