| 456 | |
| 457 | |
| 458 | class StdOutputFile(StdioFile): |
| 459 | |
| 460 | def writable(self): |
| 461 | return True |
| 462 | |
| 463 | def write(self, s): |
| 464 | if self.closed: |
| 465 | raise ValueError("write to closed file") |
| 466 | s = str.encode(s, self.encoding, self.errors).decode(self.encoding, self.errors) |
| 467 | return self.shell.write(s, self.tags) |
| 468 | |
| 469 | |
| 470 | class StdInputFile(StdioFile): |