MCPcopy
hub / github.com/pyodide/pyodide / write_file

Function write_file

src/tests/test_filesystem_mounting.py:60–62  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

58
59def py_write_file_source(index: int) -> str:
60 def write_file():
61 with open("/pyodide{index}/file_from_{index}.txt", "w", encoding="utf-8") as f:
62 f.write("pyodide{index}")
63
64 return (
65 getsource(write_file).format(index=index).lstrip() + f"{write_file.__name__}()"

Callers

nothing calls this directly

Calls 2

openFunction · 0.85
writeMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…