compile and eval is a good way to go.
Regards,
Fuzzy
http://www.voidspace.org.uk/python/index.shtml
--
http://mail.python.org/mailman/listinfo/python-list
Craig Howard wrote:
I am working on a python project where an object will have a script that
can be edited by the end user: object.script
If the script is a simple one with no functions, I can easily execute it
using:
exec object.script
Take a look at the execfile builtin.
But if the object
Craig Howard wrote:
I am working on a python project where an object will have a script that
can be edited by the end user: object.script
If the script is a simple one with no functions, I can easily execute it
using:
exec object.script
But if the object script is a bit more complicated, su
I am working on a python project where an object will have a script that
can be edited by the end user: object.script
If the script is a simple one with no functions, I can easily execute it
using:
exec object.script
But if the object script is a bit more complicated, such as the example
belo