[issue28231] zipfile does not support pathlib

Berker Peksag report at bugs.python.org
Sun Feb 26 12:05:02 EST 2017


Berker Peksag added the comment:

PR 322 should make the example in msg284754 work:

>>> import pathlib, zipfile
>>> f = pathlib.Path('spam.zip')
>>> with zipfile.ZipFile(f) as zf:
...   zf.namelist()
... 
['LICENSE']

It doesn't implement full PathLike support, but it at least covers the use cases of Jeremy and Steve.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue28231>
_______________________________________


More information about the Python-bugs-list mailing list