MCPcopy Create free account
hub / github.com/deepnote/vscode-deepnote / _download_and_extract

Function _download_and_extract

pythonFiles/install_debugpy.py:37–48  ·  view source on GitHub ↗
(root, url, version)

Source from the content-addressed store, hash-verified

35
36
37def _download_and_extract(root, url, version):
38 root = os.getcwd() if root is None or root == "." else root
39 builtins.print(url)
40 with url_lib.urlopen(url) as response:
41 data = response.read()
42 with zipfile.ZipFile(io.BytesIO(data), "r") as wheel:
43 for zip_info in wheel.infolist():
44 # Ignore dist info since we are merging multiple wheels
45 if ".dist-info/" in zip_info.filename:
46 continue
47 builtins.print("\t" + zip_info.filename)
48 wheel.extract(zip_info.filename, root)
49
50
51def main(root):

Callers 1

mainFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected