MCPcopy Create free account
hub / github.com/ScrapeGraphAI/Scrapegraph-ai / save_code_to_file

Function save_code_to_file

scrapegraphai/utils/save_code_to_file.py:6–15  ·  view source on GitHub ↗

Saves the generated code to a Python file. Args: code (str): The generated code to be saved. filename (str): name of the output file

(code: str, filename: str)

Source from the content-addressed store, hash-verified

4
5
6def save_code_to_file(code: str, filename: str) -> None:
7 """
8 Saves the generated code to a Python file.
9
10 Args:
11 code (str): The generated code to be saved.
12 filename (str): name of the output file
13 """
14 with open(filename, "w") as file:
15 file.write(code)

Callers 1

runMethod · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected