[Zope] comparing strings

Katie Legere klegere at kfpl.ca
Fri Oct 17 10:14:57 EDT 2003


I'm was calling a python method from my dtml method and passing it 2 strings
which I would like to compare for equality (are they the same string) but I
have 2 questions ..

Can I do this in dtml without calling the script?

I've tried:

 <dtml-if expr="REQUEST.has_key(link_url) and
  link_url==remove_link_url">
         equal
 <dtml-else>
         not
 </dtml-if>


If I call a python script to do this, how do I complare strings in Python? I
tried passing the 2 strings and using

        strcmp(link_url,remove_link_url)

but that doesn't seem to do it either.


Katie Legere
Kingston Frontenac Public Library




More information about the Zope mailing list