Write the whole configuration to the file it was read from. If filename is specified, write to this file instead.
(self, filename=None)
| 423 | output.write(line + '\n') |
| 424 | |
| 425 | def write(self, filename=None): |
| 426 | """Write the whole configuration to the file it was read from. |
| 427 | |
| 428 | If filename is specified, write to this file instead. |
| 429 | """ |
| 430 | if filename is None: |
| 431 | filename = self.filename |
| 432 | with open(filename, 'w', encoding='utf-8') as output: |
| 433 | self.write_to_stream(output) |
| 434 | |
| 435 | if __name__ == '__main__': |
| 436 | def main(): |