Hi David, Well, to make it work: <dtml-var "_.abs(-23)"> That's one, of probably many, ways to do it. As for the discussion of Zope and namespaces, I'll leave that to those who have already explained it more eloquently than I ever could. Search the mailing list archives for 'namespace' and you'll find many posts with great explanations. Good luck, Eric.
-----Original Message----- From: zope-admin@zope.org [mailto:zope-admin@zope.org]On Behalf Of David Lambert Sent: Thursday, August 09, 2001 12:46 PM To: Zope Subject: [Zope] Newbie still having problems understanding namespaces
I'm sure this is a case of RTFM, but I think I may be reading the wrong FM! Looking at the DTML reference section n the Zope Book (PDF version) on page 228, I see a set of DTML functions which I had assumed I could call, for example:
<dtml-var expr="abs(-23)"> which I would have expected to evaluate to 23.
Instead I get the error:
Error Type: NameError Error Value: global name 'abs' is not defined.
I guess this is because abs is not in the current nemespace. My question is where is the documentation that tells me which namespace to use and when?
TIA
Dave Lambert
_______________________________________________ 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 )