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

Function run_emscripten_python

Platforms/emscripten/__main__.py:583–601  ·  view source on GitHub ↗

Run the built emscripten Python.

(context)

Source from the content-addressed store, hash-verified

581
582
583def run_emscripten_python(context):
584 """Run the built emscripten Python."""
585 host_dir = context.build_paths["host_dir"]
586 exec_script = host_dir / "python.sh"
587 if not exec_script.is_file():
588 print("Emscripten not built", file=sys.stderr)
589 sys.exit(1)
590
591 args = context.args
592 # Strip the "--" separator if present
593 if args and args[0] == "--":
594 args = args[1:]
595
596 if context.test:
597 args = load_config_toml()["test-args"] + args
598 elif context.pythoninfo:
599 args = load_config_toml()["pythoninfo-args"] + args
600
601 os.execv(str(exec_script), [str(exec_script), *args])
602
603
604def build_target(context):

Callers

nothing calls this directly

Calls 4

load_config_tomlFunction · 0.85
strFunction · 0.85
is_fileMethod · 0.45
exitMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…