diff --git a/mindie/sort_results.py b/mindie/sort_results.py new file mode 100644 index 00000000..53730066 --- /dev/null +++ b/mindie/sort_results.py @@ -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()