I can create and read archive with the Python3 package zipfile
without any problems. But I am not able to open that archives with other programms - not on Windows 10 (in-build extractor) nor GNU/Linux.
My goal is to create zip files with Python3 that can opened on nearly every machine and every zipper-programm.
The error messages using Windows10 archiver or XArchiver on XFCE are unspecific. But on the shell (Debian GNU/Linux 10) I can see this
$ unzip the_archive.zip
Archive: the_archive.zip
skipping: in_zip.txt need PK compat. v6.3 (can do v4.6)
This is Python3 code to create such an archive
#!/usr/bin/env python3
import zipfile
# the file that will be zipped
with open('in_zip.txt', 'w') as f:
f.write('foobar')
# create zip file
with zipfile.ZipFile('the_archive.zip', 'w',
compression=zipfile.ZIP_LZMA,
compresslevel=9) as zip_file: # maximum
zip_file.write('in_zip.txt')