MCPcopy
hub / github.com/csev/py4e / save

Method save

lectures/srt-split/pysrt/srtfile.py:217–230  ·  view source on GitHub ↗

save([path][, encoding][, eol]) Use initial path if no other provided. Use initial encoding if no other provided. Use initial eol if no other provided.

(self, path=None, encoding=None, eol=None)

Source from the content-addressed store, hash-verified

215 cls._handle_error(error, error_handling, index)
216
217 def save(self, path=None, encoding=None, eol=None):
218 """
219 save([path][, encoding][, eol])
220
221 Use initial path if no other provided.
222 Use initial encoding if no other provided.
223 Use initial eol if no other provided.
224 """
225 path = path or self.path
226 encoding = encoding or self.encoding
227
228 save_file = codecs.open(path, 'w+', encoding=encoding)
229 self.write_into(save_file, eol=eol)
230 save_file.close()
231
232 def write_into(self, output_file, eol=None):
233 """

Callers 3

x.pyFile · 0.45
y.pyFile · 0.45
splitMethod · 0.45

Calls 3

write_intoMethod · 0.95
openMethod · 0.80
closeMethod · 0.45

Tested by

no test coverage detected