I came up over this problem while trying to decompress a zip file.
-- zipfile.is_zipfile(my_file)
always returns False, even though the UNIX command unzip handles it just fine. Also, when trying to do zipfile.ZipFile(path/file_handle_to_path)
I get the same error
-- the file
command returns Zip archive data, at least v2.0 to extract
and using less
on the file it shows:
PKZIP for iSeries by PKWARE
Length Method Size Cmpr Date Time CRC-32 Name
2113482674 Defl:S 204502989 90% 2010-11-01 08:39 2cee662e myfile.txt
2113482674 204502989 90% 1 file
Any ideas how can I go around this issue ? It would be nice if I could make python's zipfile
work since I already have some unit tests that I'll have to drop if I'll switch to running subprocess.call("unzip")