From 0ff5d3cb064ae938fc512d1078f2edbd29fdac7e Mon Sep 17 00:00:00 2001 From: Daniel Toyra <dtoyra@star.sr.bham.ac.uk> Date: Fri, 11 Sep 2015 19:09:44 +0100 Subject: [PATCH] Fixed so trace commands can be parsed and output in Python 3 --- pykat/finesse.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/pykat/finesse.py b/pykat/finesse.py index e970c0b..1e96ee4 100644 --- a/pykat/finesse.py +++ b/pykat/finesse.py @@ -1401,8 +1401,12 @@ class kat(object): #if search > -1: #print ("Trace 1: {0}".format(out[search:])) - # for now, just try to print the trace block in full - print (out[out.find(' ---') :]) + # For now, just try to print the trace block in full. + # Converting to unicode so it works in python 3. + tmpOut = out.decode('unicode_escape') + print (tmpOut[tmpOut.find(' ---') :]) + # print (out[out.find(' ---') :]) + katfile.close() perfData = [] -- GitLab