John Howard John Howard - 1 year ago 88
Python Question

Unzipping files in python

I read through the zipfile modules docs, but couldn't understand how to unzip a file, only how to zip a file. How do I unzip all the contents of a zip file into the same directory?

Answer Source
zip_ref = zipfile.ZipFile(path_to_zip_file, 'r')

Thats pretty much it.!