(self, filename)
| 212 | return '\n'.join(out) |
| 213 | |
| 214 | def save(self, filename): |
| 215 | text = self.xml() |
| 216 | with open(filename, "w", encoding='utf-8') as f: |
| 217 | f.write(text) |
| 218 | if text and not text.endswith('\n'): |
| 219 | f.write('\n') |
| 220 | |
| 221 | def load(self, filename): |
| 222 | with open(filename, 'rb') as f: |