i think eval should be an expression... a = eval("1 + 2") should work.