file compression
Peter Maas
peter.maas at mplusr.de
Tue Jun 29 03:52:49 EDT 2004
Elaine Jackson schrieb:
> Maybe I'm just dense but I can't figure out how to UNzip a zip file with the
> code from the zipfile module. Would you mind showing me what that would look
> like?
z = ZipFile(file, mode="r", compression=ZIP_STORED)
contents = z.read()
z.close()
uz = file("unzippedfile", "wb")
uz.write(contents)
uz.close()
Mit freundlichen Gruessen,
Peter Maas
--
-------------------------------------------------------------------
Peter Maas, M+R Infosysteme, D-52070 Aachen, Tel +49-241-93878-0
eMail 'cGV0ZXIubWFhc0BtcGx1c3IuZGU=\n'.decode('base64')
-------------------------------------------------------------------
More information about the Python-list
mailing list