Hi everyone, Is it possible to use python's eval method from inside a DTML method? I have a parameter that is passed into the method that is the string representation of a python list and I wanted to use eval to convert it to a list that I could iterate over. Thanks, Kevin
You can't use 'eval' in either a DTML method or a python script. You have to create an external method to use 'eval'. Jonathan ----- Original Message ----- From: "Kevin Carlson" <khcarlso@bellsouth.net> To: <zope@zope.org> Sent: February 6, 2004 1:13 PM Subject: [Zope] eval in DTML
Hi everyone,
Is it possible to use python's eval method from inside a DTML method? I have a parameter that is passed into the method that is the string representation of a python list and I wanted to use eval to convert it to a list that I could iterate over.
Thanks,
Kevin
_______________________________________________ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Is it possible to use python's eval method from inside a DTML method? I have a parameter that is passed into the method that is the string representation of a python list and I wanted to use eval to convert it to a list that I could iterate over.
There is rarely a good reason to use eval (although it does happen) in Zope. Make sure you cant send the list as a list, rather than a string. -- Andy McKay ClearWind Consulting http://www.clearwind.ca
participants (3)
-
Andy McKay -
Kevin Carlson -
Small Business Services