From 88cc9c18e47a886bdc0ea2427d1ce7d95f672fdf Mon Sep 17 00:00:00 2001 From: HuangHai <10402852@qq.com> Date: Mon, 30 Jun 2025 16:16:48 +0800 Subject: [PATCH] 'commit' --- dsRag/Test/TestReadMathType.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/dsRag/Test/TestReadMathType.py b/dsRag/Test/TestReadMathType.py index 3ad4b5fe..5fa5c3c5 100644 --- a/dsRag/Test/TestReadMathType.py +++ b/dsRag/Test/TestReadMathType.py @@ -12,5 +12,7 @@ output_file = r"d:\output.txt" # 可修改为您需要的路径 command = mtef + r" -w " + sourceDocx + " -o " + output_file os.system(command) # 把output.txt里的内容打印出来看看 +# 加上行号 with open(output_file, 'r', encoding='utf-8') as file: - print(file.read()) + for i, line in enumerate(file): + print(f"{i+1}: {line.strip()}")