chore: add sort results for mindie

This commit is contained in:
wql 2024-10-22 17:22:07 +08:00
parent 0c6ec554ba
commit 3f2f80db4d
1 changed files with 28 additions and 0 deletions

28
mindie/sort_results.py Normal file
View File

@ -0,0 +1,28 @@
import os
RESULTS_PATH = r"C:\Users\wengq\Desktop\QY项目\mindie_test_results"
def main():
tp1_result = ""
tp8_result = ""
for dirpath, dirnames, filenames in os.walk(RESULTS_PATH):
for filename in filenames:
if "tp1_result" in filename:
with open(os.path.join(dirpath, filename), 'r', encoding='utf-8') as file:
file.readline()
tp1_result += file.readline()
elif "tp8_result" in filename:
with open(os.path.join(dirpath, filename), 'r', encoding='utf-8') as file:
file.readline()
tp8_result += file.readline()
print(tp1_result)
print(tp8_result)
if __name__ == "__main__":
main()