Save the pseudo file to disk and return its content as a string of text.
(self, pseudofile, filename)
| 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 |
no test coverage detected