Prasad, Ramit wrote:
Take a look at: http://stackoverflow.com/questions/701802/how-do-i-execute-a-string-containing-python-code-in-python
And then please don't do it. eval and exec should be treated as the last resort, and then only if you really know what you are doing. They are slow, and dangerous, especially if there is *any* chance that the input strings could be coming from an untrusted user.
-- Steven _______________________________________________ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor