1
0
Fork 0
mirror of https://github.com/shlomif/PySolFC.git synced 2025-04-05 00:02:29 -04:00
PySolFC/pysollib/kpat_load_save.py
2019-05-31 19:33:02 +03:00

27 lines
591 B
Python

#! /usr/bin/env python
# -*- coding: utf-8 -*-
# vim:fenc=utf-8
#
# Copyright © 2019 Shlomi Fish <shlomif@cpan.org>
#
# Distributed under terms of the MIT license.
"""
"""
class KpatEmitter:
"""docstring for KpatEmitter"""
def _out(self, text):
"""docstring for _out"""
self.f.write(text)
def __init__(self, f):
self.f = f
self._out("""<?xml version="1.0" encoding="UTF-8"?>\n""")
def writeEmptyTag(self, name, attrs):
self._out(
"<" + name + "".join([" "+x[0]+"=\""+x[1]+"\"" for x in attrs])
+ "/>\n")