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()