@contextlib.contextmanager
def open_zip(path, *args, **kwargs):
  with contextlib.closing(zipfile.ZipFile(path, *args, **kwargs)) as zip:
    yield zip
A contextmanager for zip files.  Passes through positional and kwargs to zipfile.ZipFile.
dataset/ETHPy150Open pantsbuild/pex/pex/common.py/open_zip