mirror of
https://github.com/evennia/evennia.git
synced 2026-03-24 00:36:30 +01:00
Fix to @py to a) print value of expressions, and b) print duration when requested for evals
This commit is contained in:
parent
9d0baa2d5c
commit
230e12d8b6
1 changed files with 2 additions and 2 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue