MCPcopy Create free account
hub / github.com/Distrotech/reportlab / savetofile

Method savetofile

tools/pythonpoint/pythonpoint.py:426–436  ·  view source on GitHub ↗

Save the pseudo file to disk and return its content as a string of text.

(self, pseudofile, filename)

Source from the content-addressed store, hash-verified

424 return self.savetofile(outfile, filename)
425
426 def savetofile(self, pseudofile, filename):
427 """Save the pseudo file to disk and return its content as a
428 string of text."""
429 pseudofile.flush()
430 content = pseudofile.getvalue()
431 pseudofile.close()
432 if filename :
433 outf = open(filename, "wb")
434 outf.write(content)
435 outf.close()
436 return content
437
438
439

Callers 2

saveAsPresentationMethod · 0.95
saveAsHandoutMethod · 0.95

Calls 3

flushMethod · 0.80
closeMethod · 0.45
writeMethod · 0.45

Tested by

no test coverage detected