Looks like the eval() will work great. Thanks so much for telling me. 
>
>We normally warn against using eval/exec because 
they form a security risk. But in your case you 
are in control of the code that they execute so 
its ok. That is the kind of usage where they 
are the best solution.

Be very wary of cases where you read stored code 
from a file and execute it however. Its opssible 
a malicious user could add/change the code to do 
something bad. But provided you create the 
executing code yourself you should be fine.


Alan G
_______________________________________________
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor

Reply via email to