mirror of
https://github.com/RYDE-WORK/ballistica.git
synced 2026-02-07 16:13:23 +08:00
cloud console eval now shows repr not str
This commit is contained in:
parent
f81c94895f
commit
46c2129aae
@ -123,10 +123,10 @@ def cloud_console_exec(code: str) -> None:
|
|||||||
if evalcode is not None:
|
if evalcode is not None:
|
||||||
# pylint: disable=eval-used
|
# pylint: disable=eval-used
|
||||||
value = eval(evalcode, vars(__main__), vars(__main__))
|
value = eval(evalcode, vars(__main__), vars(__main__))
|
||||||
# For eval-able statements, print the resulting value
|
# For eval-able statements, print the resulting value if
|
||||||
# if it is not None.
|
# it is not None (just like standard Python interpreter).
|
||||||
if value is not None:
|
if value is not None:
|
||||||
print(value, file=sys.stderr)
|
print(repr(value), file=sys.stderr)
|
||||||
|
|
||||||
# Fall back to exec if we couldn't compile it as eval.
|
# Fall back to exec if we couldn't compile it as eval.
|
||||||
else:
|
else:
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user