From bb4268518bbda9e428572f7203c6326280cbd0fb Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Wed, 16 Mar 2022 12:56:19 -0400 Subject: [PATCH] make python 2 compatible --- tools/python/log2txt.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tools/python/log2txt.py b/tools/python/log2txt.py index 5c6706130a..e9d9d57255 100755 --- a/tools/python/log2txt.py +++ b/tools/python/log2txt.py @@ -34,7 +34,7 @@ lg = log(logfile) if columns == []: lg.write(datafile, writenames) else: - str = f"lg.write(datafile, {writenames}," - for word in columns: str += '"' + word + '",' - str = str[:-1] + ')' + str = "lg.write(datafile, %r" % writenames + for word in columns: str += ',"' + word + '"' + str += ')' eval(str)