[ZPT] Evaluating a string?

Chris Withers chris at simplistix.co.uk
Tue Feb 24 09:03:27 EST 2004


Hi Phil,

Philip Kilner wrote:
> - Zope doesn't permit access to the "exec" in Python, which was my first 
> line of attack.

For very good security reasons ;-)

> - If the variable isn't there, you get key errors, so you need: -
> 
>     <tal:block tal:condition="exists:python:path(error_message)" 
> content="python:path(error_message)"/>

Or neater:

<tal:x replace="my_thing here/?error_message|string:Unknown Error"/>

cheers,

Chris




More information about the ZPT mailing list