daniel-s
6/24/2015 - 10:30 AM

Python extract Zip file.

Python extract Zip file.

from zipfile import ZipFile

# Supposing we have a my_file.zip file in the same directory

datafile = "my_file"

def open_zip(datafile):
  with ZipFile('{0}.zip'.format(datafile), 'r') as myzip:
    myzip.extractall()