Parsing Python code with a Python Program
p.willis at telus.net
Mon Aug 23 02:14:34 CEST 2004
I had my quotes wrong is all.
exec 'print "Hello"'
s = 'print "hello"'
> I would like to pass strings to a Python
> application and have them executed as though
> they were lines of code.
> Is 'exec()' the function that I am looking for
> and/or is there an example of this somewhere?
More information about the Python-list