John Howard John Howard - 2 years ago 133
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.!

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download