MCPcopy Create free account
hub / github.com/RT-Thread/env-windows / save

Method save

tools/python-3.11.9-amd64/Tools/demo/spreadsheet.py:214–219  ·  view source on GitHub ↗
(self, filename)

Source from the content-addressed store, hash-verified

212 return '\n'.join(out)
213
214 def save(self, filename):
215 text = self.xml()
216 with open(filename, "w", encoding='utf-8') as f:
217 f.write(text)
218 if text and not text.endswith('\n'):
219 f.write('\n')
220
221 def load(self, filename):
222 with open(filename, 'rb') as f:

Callers 2

test_basicFunction · 0.95
saveMethod · 0.45

Calls 4

xmlMethod · 0.95
endswithMethod · 0.80
openFunction · 0.50
writeMethod · 0.45

Tested by 1

test_basicFunction · 0.76