Is there a way of executing a command in a string?

Jerry He rebound1618 at
Wed Aug 10 04:55:39 CEST 2005

  suppose I have the following string

cmdstr = "b = lambda s: s*s"

  Is there a way to execute this string other than
copying it onto a file and then importing it? 

thanks in advance, 


Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 

More information about the Python-list mailing list