def write(self, s): fd = open("log.text","a") fd.write(s) fd.close() if str(s) == "\n": self.__curLineWrtCnt = -1 if self.__curLineWrtCnt == 0: cm.cwrite("python: ", "yellow_h", "") self.__curLineWrtCnt += 1 cm.cwrite(str(s)) # c++层使用gbk编码, c++层已做处理
def write(self, s): fd = open("log.text","a") fd.write(s) fd.close() cm.cwrite(str(s),"red_h", "")