Skip to navigation
Zip and simply unzip with python
07.12.13
#create zip file import zipfile z = zipfile.ZipFile(path_of_file_to_be_saved_as/name.zip', "w",zipfile.ZIP_DEFLATED) f = 'name.db' z.write(path_of_file_to_be_zipped/'+f,arcname = f) z.close() #unzip import zipfile zipdata = zipfile.ZipFile('fileofzip.zip','r') zipdata.extract('name_of_extracted.db','path_where_to_save/') zipdata.close() http://docs.python.org/2/library/zipfile
Reply
Anonymous
Information Epoch 1732510317
Design for simplicity, add complexity only where you must.
Home
Notebook
Contact us