Exemple #1
0
 def write_extra(self):
     # os.system('cp ' + Gateway.EXTRAXML + ' ' + Gateway.EXTRAXML + ".backup")
     remove_ignorable_whitespace(self.extra)
     file = open(Gateway.EXTRAXML, "w")
     file.write(etree.tostring(self.extra, encoding="UTF-8", xml_declaration=True, pretty_print=True))
     file.close()
     backup(Gateway.PATH + "extra.xml")
Exemple #2
0
 def write_settings(self):
     # os.system('cp ' + Gateway.SETTINGS + ' ' + Gateway.SETTINGS + ".backup")
     remove_ignorable_whitespace(self.extra)
     file = open(Gateway.SETTINGS, "w")
     file.write(etree.tostring(self.settings, encoding="UTF-8", xml_declaration=True, pretty_print=True))
     file.close()
     backup(Gateway.PATH + "setting.xml")
Exemple #3
0
 def write(self, root):
     # os.system('cp ' + Gateway.GATEWAYXML + ' ' + Gateway.GATEWAYXML + ".backup")
     remove_ignorable_whitespace(root)
     file = open(Gateway.GATEWAYXML, "w")
     file.write(etree.tostring(root, encoding="UTF-8", xml_declaration=True, pretty_print=True))
     file.close()
     self.gw_config = root
     backup(Gateway.PATH + "gateway.xml")
Exemple #4
0
	def write(self):
		remove_ignorable_whitespace(self.root)
		file = open(Venue.XML,'w')
		file.write(etree.tostring(self.root, encoding='UTF-8', xml_declaration=True, pretty_print=True))
		file.close()
def write(root):
	remove_ignorable_whitespace(root)
        file = open(Gateway.PATH + "dictionary.xml",'w')
	file.write(etree.tostring(root, encoding='UTF-8', xml_declaration=True, pretty_print=True))
	file.close()
	backup(Gateway.PATH + 'dictionary.xml')