[Tutor] Unzipping a Zip of folders that have zips within them that I'd like to unzip all at once.
gnj091405 at gmail.com
Mon Sep 24 23:15:29 CEST 2012
>> but now get a " x = zipfile.Zipfile(item,'r')
>> AttributeError: 'module' object has no attribute 'Zipfile' "
>> grrrrr, this is going to send me to the funny farm!
> One way to avoid the "funny farm" is to learn to use the tools that
> Python provides, built-in. As soon as you get an error like that one,
> add a print statement immediately before the one in error, and find the
> type and attributes of the object that supposedly doesn't have the
> attribute. For example, you could have added a dir(zipfile), and then
> studied the one that seems to be the same as the one you tried to use.
> Presumably you would have quickly discovered what Oscar pointed out.
Thank you, I have printed and added to my Python quick hints.
> We all make typos, the difference is in how quickly we find and fix
> them. Use the tools.
must admit, I didn't notice the typo.
More information about the Tutor