From 0c3a746db457ede0651838c112a62281d8e8305d Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Wed, 29 Nov 2017 23:17:58 +0000 Subject: [PATCH] findcurve output: tolerate "commentary" GSL siman generates this Signed-off-by: Ian Jackson --- helixish.py | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/helixish.py b/helixish.py index ac6d473..72393b6 100644 --- a/helixish.py +++ b/helixish.py @@ -193,18 +193,25 @@ class HelixishCurve(): findcurve_subproc.stdin.flush() hc.func = symbolic.get_python() + commentary = '' while True: l = findcurve_subproc.stdout.readline() l = l.rstrip() #dbg('GOT ', l) if not l: vdbg().crashing('findcurve EOF') + if not l.startswith('['): + commentary += ' ' + commentary += l + continue + l = eval(l) if not l: break - dbg(('%s Q=[%10.7f %10.7f %10.7f] dQ=[%10.7f %10.7f %10.7f]') + dbg(('%s Q=[%10.7f %10.7f %10.7f] dQ=[%10.7f %10.7f %10.7f]%s') % - (( dbg_fmt_params(l[0:6]), ) + tuple(l[6:12]) )) + (( dbg_fmt_params(l[0:6]), ) + tuple(l[6:12]) + (commentary,) )) + commentary = '' hc.findcurve_result = l[0:6] hc.threshold = l[0]**2 -- 2.30.2