try eval first

This commit is contained in:
Lieuwe 2011-02-27 04:32:53 +08:00 committed by Simon Robertshaw
parent 7f159be25a
commit bda76e2e4e

View File

@ -95,9 +95,12 @@ def handle(txt):
def _handle(txt): def _handle(txt):
#print "handling '%s'"%txt #print "handling '%s'"%txt
try: try:
exec txt sys.stdout.write(repr(eval(tmp)))
except Exception as ex: except:
error(ex) try:
exec txt
except Exception as ex:
error(ex)