MCPcopy Index your code
hub / github.com/python/cpython / _write_to_zip

Function _write_to_zip

PC/layout/main.py:359–371  ·  view source on GitHub ↗
(zf, dest, src, ns, checked=True)

Source from the content-addressed store, hash-verified

357
358
359def _write_to_zip(zf, dest, src, ns, checked=True):
360 pyc = _py_temp_compile(src, dest, ns, checked=checked)
361 if pyc:
362 try:
363 zf.write(str(pyc), dest.with_suffix(".pyc"))
364 finally:
365 try:
366 pyc.unlink()
367 except:
368 log_exception("Failed to delete {}", pyc)
369 return
370
371 zf.write(str(src), str(dest))
372
373
374def generate_source_files(ns):

Callers 1

generate_source_filesFunction · 0.85

Calls 6

_py_temp_compileFunction · 0.85
strFunction · 0.85
log_exceptionFunction · 0.85
writeMethod · 0.45
with_suffixMethod · 0.45
unlinkMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…