From 763a4d3011997c67c60b191b719bc4c25c252ab1 Mon Sep 17 00:00:00 2001 From: Sebastien Bourdeauducq Date: Wed, 2 Mar 2016 11:47:34 +0800 Subject: [PATCH] rpctool: use pprint in interactive mode --- artiq/frontend/artiq_rpctool.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/artiq/frontend/artiq_rpctool.py b/artiq/frontend/artiq_rpctool.py index 1f5d9b394..4c63f7428 100755 --- a/artiq/frontend/artiq_rpctool.py +++ b/artiq/frontend/artiq_rpctool.py @@ -99,7 +99,7 @@ def interactive(remote): else: return getattr(remote, k) try: - result = eval(cmd, {}, RemoteDict()) + ret = eval(cmd, {}, RemoteDict()) except Exception as e: if isinstance(e, RemoteError): print("Remote exception:") @@ -107,8 +107,8 @@ def interactive(remote): else: traceback.print_exc() else: - if result is not None: - print(result) + if ret is not None: + pprint.pprint(ret) def main():