From 0c7eae61f3e805de0c74ad4d01306ee68085e729 Mon Sep 17 00:00:00 2001 From: Maciej Dudek Date: Wed, 22 Sep 2021 16:43:22 +0200 Subject: [PATCH] Fix backslash escape by converting any series of them into single backslash Signed-off-by: Maciej Dudek --- fpga_interchange/compare_timings.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/fpga_interchange/compare_timings.py b/fpga_interchange/compare_timings.py index 1a08a6e4..befe33a0 100644 --- a/fpga_interchange/compare_timings.py +++ b/fpga_interchange/compare_timings.py @@ -17,6 +17,7 @@ import argparse import sys +import re # ============================================================================ @@ -50,12 +51,16 @@ def main(): with open(args.base_timing, 'r') as f: for line in f.readlines(): line = line.split() + line[0] = re.sub(r"\\\\*", '\\', line[0]) + print(line[0]) baseline[line[0]] = int(float(line[1])) comp = {} with open(args.compare_timing, 'r') as f: for line in f.readlines(): line = line.split() + line[0] = re.sub(r"\\\\*", '\\', line[0]) + print(line[0]) comp[line[0]] = int(float(line[1])) map_net = {}