Last active
August 29, 2015 14:21
-
-
Save anishmenon/de24c22a72c86492a485 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
filenames = ["/home/node4/anish/varnan/1.jpg", "/home/node4/anish/varnan/2.jpg"] | |
import zipfile | |
import glob, os | |
file = zipfile.ZipFile("/home/node4/anish/download.zip", "w") | |
for name in filenames: | |
file.write(name, os.path.basename(name), zipfile.ZIP_DEFLATED) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment