Exemple #1
0
	def create(self, lines = ['']):
		if os.path.exists(self.__name):
			self.remove()
		with open(self.__name,"w") as fd:
			for line in lines:
				data = xnString.o2j(line)
				data = '' if data == '""' else data
				fd.write(data+'\n')
Exemple #2
0
	def modify(self, lines = ['']):
		self.__clean()
		with open(self.__tname, "w") as fd:
			for line in lines:
				data = xnString.o2j(line)
				data = '' if data == '""' else data
				fd.write(data + '\n')
		os.rename(self.__tname, self.__mname)
		self.__modify_rename()
		self.cache = lines