Liyu Gong <[email protected]> added the comment:
Sorry, I made a mistake. I retested on the following content
a.zip ==> abc/def/1.zip
zf = zipfile.ZipFile('a.zip')
memf = zf.open('abc/def/1.zip', 'r')
zf2 = zipfile.ZipFile(memf)
will raise an error. However, when a.zip is a tar file containing
'abc/def/1.zip', the following codes
a.tar ===> abc/def/1.zip
tf = tarfile.open('a.tar')
memf = tf.extractfile('abc/def/1.zip')
zf2 = zipfile.ZipFile(memf)
works well.
Since only one file can be uploaded, I will try to upload the tar file on the
next post.
----------
status: pending -> open
Added file: https://bugs.python.org/file48165/a.zip
_______________________________________
Python tracker <[email protected]>
<https://bugs.python.org/issue36088>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com