summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLieuwe <lieuwemo@gmail.com>2011-02-26 20:32:53 (GMT)
committer Lieuwe <lieuwemo@gmail.com>2011-02-26 20:32:53 (GMT)
commit7d615c2a870dc930b0957669b49670f9c28999c5 (patch)
treebcc665cbc419fe797408f6211344f7d2b21010e7
parent9de1949dab676f9146efbed919064abd35d0aa57 (diff)
downloadpowder-7d615c2a870dc930b0957669b49670f9c28999c5.zip
powder-7d615c2a870dc930b0957669b49670f9c28999c5.tar.gz
try eval first
-rw-r--r--build/tpt_console.py9
1 files changed, 6 insertions, 3 deletions
diff --git a/build/tpt_console.py b/build/tpt_console.py
index 9e5e824..655c108 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