[Tutor] Unzipping a Zip of folders that have zips within them that I'd like to unzip all at once.
oscar.j.benjamin at gmail.com
Mon Sep 24 04:59:21 CEST 2012
On 24 September 2012 03:26, Gregory Lund <gnj091405 at gmail.com> wrote:
> > 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')
> but now get a " x = zipfile.Zipfile(item,'r')
> AttributeError: 'module' object has no attribute 'Zipfile' "
Capital F. ZipFile not Zipfile.
> grrrrr, this is going to send me to the funny farm!
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Tutor