[Zope] Comparing returned Python Script values

wazum-mail (wolfgang) wazum-mail (wolfgang)" <wolfgang@wazum.com
Sat, 28 Apr 2001 06:30:59 +0200


Hi!

>Hi,
>
>I have two Python Scripts that returns a string when called.
>I need to test if the returned string values are equal.
>
>For testing purposes I have created two Python Scripts (script1 and
>script2), each containing only the following line of code:
>return 'test'
>
>The following DTML tells me that my strings are not equal:
><dtml-if expr="script1 == script2">
>    Strings are equal
><dtml-else>
>    Strings are *not* equal
></dtml-if>
>
...


you'll have to "call" the scripts to get this done
(brackets!!!)

<dtml-if expr="script1() == script2()">
    Strings are equal
<dtml-else>
    Strings are *not* equal
</dtml-if>


this works

Wolfgang