MCPcopy Index your code
hub / github.com/RustPython/RustPython / write_output

Function write_output

scripts/update_lib/cmd_patches.py:24–30  ·  view source on GitHub ↗
(data: str, dest: str)

Source from the content-addressed store, hash-verified

22
23
24def write_output(data: str, dest: str) -> None:
25 if dest == "-":
26 print(data, end="")
27 return
28
29 with open(dest, "w") as fd:
30 fd.write(data)
31
32
33def main(argv: list[str] | None = None) -> int:

Callers 1

mainFunction · 0.85

Calls 3

printFunction · 0.50
openFunction · 0.50
writeMethod · 0.45

Tested by

no test coverage detected