Last active
October 29, 2019 13:32
-
-
Save romainGuiet/e590092c2924a17e2e9790800ab42328 to your computer and use it in GitHub Desktop.
Export zip file content in current working directory
This file contains 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
archive_name = "models.zip" | |
import os | |
import zipfile | |
# retrieve the pat of the current directory (bash command uses !...) | |
path=!pwd | |
path = path[0] | |
# create the archive path using path and archive_name | |
archive_path = os.path.join(path,archive_name) | |
if ( zipfile.is_zipfile(archive_path) ): | |
print( "extract : "+ archive_name ) | |
#zf=zipfile.ZipFile(image_archive_name, 'r', allowZip64=True) | |
zf = zipfile.ZipFile(archive_path, 'r') | |
zf.extractall() | |
print("Zip extraction: DONE") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment