diff --git a/school_center.py b/school_center.py index 271e2f0..9140f8f 100644 --- a/school_center.py +++ b/school_center.py @@ -207,8 +207,8 @@ def is_allocated(scode1: str, scode2: str) -> bool: OUTPUT_DIR = 'results/' create_dir(OUTPUT_DIR) # Create the output directory if not exists -with open('{}school-center-distance.tsv'.format(OUTPUT_DIR), 'w', encoding='utf-8') as intermediate_file, \ - open(OUTPUT_DIR + args.output, 'w', encoding='utf-8') as a_file: +with open(os.path.join(OUTPUT_DIR, 'school-center-distance.tsv'), 'w', encoding='utf-8') as intermediate_file, \ + open(os.path.join(OUTPUT_DIR, args.output), 'w', encoding='utf-8') as a_file: writer = csv.writer(intermediate_file, delimiter="\t") writer.writerow(["scode", "s_count",