> states= { > 1: compile("x=x+1","<string>","single"), > 2: compile("x=x+2","<string>","single") > } Dammit. This doesn't work for compiled code because of a bug in Python. Plain strings work fine tho': states= { 1: "x=x+1", 2: "x=x+2" } Sent via Deja.com http://www.deja.com/ Before you buy.