From 27e49e5782e07566aac42d6363bd5233bf5e396d Mon Sep 17 00:00:00 2001 From: Administrator <admin@example.com> Date: 星期四, 16 五月 2024 19:19:51 +0800 Subject: [PATCH] 可转债仿真交易/print方法替换 --- log_module/log_export.py | 13 +++++++------ 1 files changed, 7 insertions(+), 6 deletions(-) diff --git a/log_module/log_export.py b/log_module/log_export.py index 019e0af..e474279 100644 --- a/log_module/log_export.py +++ b/log_module/log_export.py @@ -5,6 +5,7 @@ import time import constant +from log_module.log import printlog from utils import tool @@ -49,7 +50,7 @@ while line: time_ = line.split(":")[-1] if int(time_) > 150: - print(line) + printlog(line) line = f.readline() @@ -96,7 +97,7 @@ for key in today_data: # news = sorted(today_data[key], key=lambda x: x["index"]) # today_data[key] = news - print(key, len(today_data[key]) - 1, today_data[key][-1]["index"]) + printlog(key, len(today_data[key]) - 1, today_data[key][-1]["index"]) except: pass return today_data @@ -151,7 +152,7 @@ break if line.find("code={}".format(code)) < 0: continue - # print(line) + # printlog(line) time_ = __get_log_time(line) if int("093000") > int(time_.replace(":", "")) or int(time_.replace(":", "")) > int("150000"): continue @@ -159,18 +160,18 @@ if line.find("鑾峰彇鍒颁拱鍏ヤ俊鍙疯捣濮嬬偣") > 0: str_ = line.split("鑾峰彇鍒颁拱鍏ヤ俊鍙疯捣濮嬬偣锛�")[1].strip() index = str_[0:str_.find(" ")].strip() - # print("淇″彿璧峰浣嶇疆锛�", index) + # printlog("淇″彿璧峰浣嶇疆锛�", index) pos_list.append((0, int(index), "")) elif line.find("鑾峰彇鍒颁拱鍏ユ墽琛屼綅缃�") > 0: str_ = line.split("鑾峰彇鍒颁拱鍏ユ墽琛屼綅缃細")[1].strip() index = str_[0:str_.find(" ")].strip() - # print("涔板叆鎵ц浣嶇疆锛�", index) + # printlog("涔板叆鎵ц浣嶇疆锛�", index) pos_list.append((1, int(index), "")) elif line.find("瑙﹀彂鎾ゅ崟锛屾挙鍗曚綅缃細") > 0: str_ = line.split("瑙﹀彂鎾ゅ崟锛屾挙鍗曚綅缃細")[1].strip() index = str_[0:str_.find(" ")].strip() - # print("鎾ゅ崟浣嶇疆锛�", index) + # printlog("鎾ゅ崟浣嶇疆锛�", index) pos_list.append((2, int(index), line.split("鎾ゅ崟鍘熷洜锛�")[1])) pass else: -- Gitblit v1.8.0