From 230e12d8b65aa14c8d4b28d5a7fc9e4ee4d6e62c Mon Sep 17 00:00:00 2001 From: Stephen Hansen Date: Fri, 1 Feb 2013 12:29:40 -0800 Subject: [PATCH] Fix to @py to a) print value of expressions, and b) print duration when requested for evals --- src/commands/default/system.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/commands/default/system.py b/src/commands/default/system.py index 6e39967c19..56b48ff504 100644 --- a/src/commands/default/system.py +++ b/src/commands/default/system.py @@ -171,8 +171,8 @@ class CmdPy(MuxCommand): t1 = timemeasure() duration = " (%.4f ms)" % ((t1 - t0) * 1000) else: - eval(pycode_compiled, {}, available_vars) - if mode == eval: + ret = eval(pycode_compiled, {}, available_vars) + if mode == "eval": ret = "{n<<< %s%s" % (str(ret), duration) else: ret = "{n<<< Done.%s" % duration