Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
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
24
def
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
33
def
main(argv: list[str] | None = None) -> int:
Callers
1
main
Function · 0.85
Calls
3
print
Function · 0.50
open
Function · 0.50
write
Method · 0.45
Tested by
no test coverage detected