main
HuangHai 3 weeks ago
parent 753dbda86f
commit 88cc9c18e4

@ -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()}")

Loading…
Cancel
Save