[Tutor] Unzipping a Zip of folders that have zips within them that I'd like to unzip all at once.
Gregory Lund
gnj091405 at gmail.com
Mon Sep 24 04:26:51 CEST 2012
>
> but a better way to do that is:
> if item.endswith('.zip')
>
>> x = zipfile.Zipfile(item,'r')
>> x.extractall()
>> x.close()
>>
ok, I used that (above)
typed below:
for item in zipContents:
if item.endswith('.zip'):
x = zipfile.Zipfile(item,'r')
x.extractall()
x.close()
but now get a " x = zipfile.Zipfile(item,'r')
AttributeError: 'module' object has no attribute 'Zipfile' "
error
grrrrr, this is going to send me to the funny farm!
greg
More information about the Tutor
mailing list