新增以下提交
1.自动判断bin文件是否需要解密 2.添加下载指定ram.bin的功能,支持命令行交互 3.去除手动指定上传还是下载的命令选项
This commit is contained in:
12
bin/log.py
12
bin/log.py
@@ -1,5 +1,5 @@
|
||||
import time
|
||||
|
||||
import sys
|
||||
|
||||
|
||||
# 同一个进程中所有调用这个文件的 .py 文件都使用这个变量
|
||||
@@ -23,6 +23,16 @@ def myprint_dec(func):
|
||||
|
||||
myprint=myprint_dec(print)
|
||||
|
||||
def mywrite(data:str):
|
||||
if(_log_fp is not None):
|
||||
txt=data.replace('\r','\n')
|
||||
txt=txt.replace('\n\n','\n')
|
||||
txt=txt.replace('\n\n','\n')
|
||||
_log_fp.write(txt)
|
||||
_log_fp.flush()
|
||||
sys.stdout.write(data)
|
||||
sys.stdout.flush()
|
||||
|
||||
def log_init(file_name:str):
|
||||
global _log_fp
|
||||
if _log_fp is None:
|
||||
|
Reference in New Issue
Block a user