From 3a5b06dda29613548dd8cbae1bc241f514467602 Mon Sep 17 00:00:00 2001 From: Andy Stone Date: Thu, 21 Sep 2023 15:30:04 -0700 Subject: [PATCH] allow quoting data entries --- Signed-off-by: Andy Stone --- util/test/chpl_plot.py | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/util/test/chpl_plot.py b/util/test/chpl_plot.py index 4f6a9c2e94db..dbac152a7a7c 100644 --- a/util/test/chpl_plot.py +++ b/util/test/chpl_plot.py @@ -666,16 +666,18 @@ def loadDatFile(filename): for dn in datanames: results[dn] = [] else: + splitEntries = shlex.split(l) + # read one config var and the rest are data - if not l.split()[0].isnumeric(): - areYValuesNumbers = False - + if not splitEntries[0].isnumeric(): + areYValuesNumbers = False + if areYValuesNumbers: - config_vars.append(float(l.split()[0])) + config_vars.append(float(splitEntries[0])) else: - config_vars.append(l.split()[0]) + config_vars.append(splitEntries[0]) - for dn, data in zip(datanames, l.split()[1:]): + for dn, data in zip(datanames, splitEntries[1:]): results[dn].append(float(data)) return Table(None, filename, config_vars, results, kvPairs)