Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- file.zip
- - first folder
- - file1.pdf
- - file2.pdf
- - second folder
- - file3.pdf
- zip_file = ZipFile(zip_file_path)
- zip_byte_array = bytearray()
- for filename in zip_file.namelist():
- byte_content = zip_file.read(filename)
- zip_byte_array.append(byte_content)
- an integer is required
- zip_file_path = shutil.make_archive(dir_path, 'zip', dir_path)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement