To zip a file in python you can use the following snippet.
import zipfile myZip = zipfile.ZipFile('MyArchive.zip','w',zipfile.ZIP_DEFLATED) myZip.write('Image1.png') myZip.close()
for more informations see Work with ZIP archives
All the Code Snippets and Samples you need
To zip a file in python you can use the following snippet.
import zipfile myZip = zipfile.ZipFile('MyArchive.zip','w',zipfile.ZIP_DEFLATED) myZip.write('Image1.png') myZip.close()
for more informations see Work with ZIP archives
You must be logged in to post a comment.
RT @CodeSnippetsNET: How to zip a file in #python http://t.co/e6xyMtlAIb #programming #coding #code #dev #developer