MCPcopy Index your code
hub / github.com/gto76/python-cheatsheet / write_to_file

Function write_to_file

web/update_plots.py:112–115  ·  view source on GitHub ↗
(filename, lines)

Source from the content-addressed store, hash-verified

110
111
112def write_to_file(filename, lines):
113 p = Path(__file__).resolve().parent / filename
114 with open(p, 'w', encoding='utf-8') as file:
115 file.writelines(lines)
116
117
118def write_to_png_file(filename, figure, width, height):

Callers 1

update_fileFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected