From 7d615c2a870dc930b0957669b49670f9c28999c5 Mon Sep 17 00:00:00 2001 From: Lieuwe Date: Sat, 26 Feb 2011 21:32:53 +0100 Subject: [PATCH] try eval first --- build/tpt_console.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/build/tpt_console.py b/build/tpt_console.py index 9e5e8240a..655c1088e 100644 --- a/build/tpt_console.py +++ b/build/tpt_console.py @@ -95,9 +95,12 @@ def handle(txt): def _handle(txt): #print "handling '%s'"%txt try: - exec txt - except Exception as ex: - error(ex) + sys.stdout.write(repr(eval(tmp))) + except: + try: + exec txt + except Exception as ex: + error(ex) \ No newline at end of file