def finished(self): if not self.filename: return body = element_to_str(self.convert_to_xml(), encoding='utf8') handle = open(self.filename, 'w') handle.write(body.decode('utf8')) handle.close()
def finished(self): if not self.filename: return body = element_to_str(self.convert_to_xml(), encoding='utf8') handle = open(self.filename, 'w') handle.write('{0}'.format(body)) handle.close()
def __str__(self): return element_to_str(self.convert_to_xml(), encoding='utf8')