From 61f45f505b1fa5a144965f30765a4a230357dbf9 Mon Sep 17 00:00:00 2001 From: Sebastien Bourdeauducq Date: Sat, 25 Jul 2015 14:37:19 +0800 Subject: [PATCH] gui/short_format: show string values --- artiq/gui/tools.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/artiq/gui/tools.py b/artiq/gui/tools.py index 536790549..f388521d8 100644 --- a/artiq/gui/tools.py +++ b/artiq/gui/tools.py @@ -13,6 +13,11 @@ def short_format(v): t = type(v) if t is int or t is float: return str(v) + elif t is str: + if len(v) < 15: + return "\"" + v + "\"" + else: + return "\"" + v[:12] + "\"..." else: r = t.__name__ if t is list or t is dict or t is set: