Thanks. I really do need to learn python. I just hesitate because of the amount of time that I've put into learning and using Perl. Thanks again, Rick
<dtml-let parts="stringVarToSplit.split('-')" part1="parts[0]" part2="parts[1]">
... dtml stuff that may use part1 and part2...
</dtml-let>
... other dtml stuff that don't need part1 or part2 anymore ...
BTW: you'd better learn some basics on Python (easy) otherwise you'll need to post here 50 times a day for such problems :) In addition, nearly 99% docs on Zope scripting stuffs are based on Pyhton.
----- Original Message ----- From: "D. Rick Anderson" <ruger@comnett.net> To: <zope@zope.org> Sent: Wednesday, February 20, 2002 7:55 PM Subject: [Zope] another simple one
: I need to split a variable out into two parts. The variable looks like : this: 108243-132 and I need to split it where the - is. I can do this easy : enough in Perl but this Zope server happens to be on a Wintendo 2000 box : and I haven't been able to get perl working correctly with Zope. Is there : an easy way to split a variable with dtml? : : "The Zope Book" that I bought doesn't seem to cover any of this, or it : does in such an obscure way that I can't find what I'm looking for. It's : been a great book to start with, but I need something that's a little more : in depth. I've seen a few more books on Amazon and I'm thinking about : buying the Zope Bible to keep me busy until Dieter's book comes out. Does : anybody have any suggestions? : : Rick : : :