On 24 September 2012 03:26, Gregory Lund <[email protected]> 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')
>         x.extractall()
>         x.close()
>
> but now get a   "  x = zipfile.Zipfile(item,'r')
> AttributeError: 'module' object has no attribute 'Zipfile' "
>

Capital F. ZipFile not Zipfile.


>
> error
>
> grrrrr, this is going to send me to the funny farm!
>
> greg
>
_______________________________________________
Tutor maillist  -  [email protected]
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor

Reply via email to