Problems with zipfile module...
Christophe Prevost
ommadawn at club-internet.fr
Wed Jan 10 05:32:05 EST 2001
Hi,
I've python 2.0, zlib etc... and when i try to use zipfile i've some
problems
for fch in lch:
if fch == sys.argv[0]: continue
print fch
dt = time.mktime(time.gmtime(os.path.getmtime(fch)))
if dt < veryold:
cpt += 1
if cpt == 1:
backup = zipfile.ZipFile(zip, "w", "ZIP_DEFLATED")
backup.write(fch)
if cpt != 0:
backup.close()
---
Raise:
Traceback (most recent call last):
File "backup.py", line 16, in ?
backup = zipfile.ZipFile(zip, "w", "ZIP_DEFLATED")
File "d:\python\lib\zipfile.py", line 104, in __init__
raise RuntimeError, "That compression method is not supported"
RuntimeError: That compression method is not supported ZIP_DEFLATED
Exception exceptions.AttributeError: "'ZipFile' instance has no attribute
'fp'" in <method ZipFile.__del__ of ZipFile instance at 00914FDC> ignored
PS: It doesn't append when i use the default compression level (not using
zlib)...
backup = zipfile.ZipFile(zip, "w")
More information about the Python-list
mailing list