Hi, How do I import a module - I've been reading the DTML guide, and I would like to use some of the functions described in the string module, but how do use them - do I have to import the module (if so, how), or what else. What I want to use is the following: <dtml-if expr="lower(somestring)=='supplier'"> </dtml-if> where lower is defined in the string module. I've also tried string.lower(...) but that didn't seem to work. thanks Allen
Allen The string module is already available, just not as you'd expect ;) Try something like: <dtml-if expr="_.string.lower(somestring)=='supplier'"> </dtml-if> Phil phil.harris@zope.co.uk ----- Original Message ----- From: "Allen Wallis" <allen@rrsg.ee.uct.ac.za> To: <zope@zope.org> Sent: Wednesday, March 29, 2000 9:29 AM Subject: [Zope] include/import module
Hi, How do I import a module - I've been reading the DTML guide, and I would like to use some of the functions described in the string module, but how do use them - do I have to import the module (if so, how), or what else. What I want to use is the following: <dtml-if expr="lower(somestring)=='supplier'">
</dtml-if> where lower is defined in the string module. I've also tried string.lower(...) but that didn't seem to work.
thanks Allen
_______________________________________________ Zope maillist - Zope@zope.org http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
Hi! <dtml-if expr="_.string.lower(somestring)=='supplier'"> </dtml-if> should work Allen Wallis schrieb:
Hi, How do I import a module - I've been reading the DTML guide, and I would like to use some of the functions described in the string module, but how do use them - do I have to import the module (if so, how), or what else. What I want to use is the following: <dtml-if expr="lower(somestring)=='supplier'">
</dtml-if> where lower is defined in the string module. I've also tried string.lower(...) but that didn't seem to work.
thanks Allen
_______________________________________________ Zope maillist - Zope@zope.org http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
participants (3)
-
Allen Wallis -
Helmut Toplitzer -
Phil Harris