Sep-15-2018, 01:27 PM
(This post was last modified: Sep-15-2018, 01:28 PM by ichabod801.)
ZipFile is a class for reading or writing zip files. Your zipfiles list is a list of strings that are file paths. They're instances of str, not ZipFile. I would normally do this by checking the extension of the paths in zipfiles (
Edit: Dead_Eye beat me with a much better explanation.
if i[-3:] not in ('zip', 'rar')
). If you are worried that some have the wrong extension, you would have to open them up iwht the ZipFile and RarFile classes, and see if there are errors trying to read them.Edit: Dead_Eye beat me with a much better explanation.
Craig "Ichabod" O'Brien - xenomind.com
I wish you happiness.
Recommended Tutorials: BBCode, functions, classes, text adventures
I wish you happiness.
Recommended Tutorials: BBCode, functions, classes, text adventures