[Zope] another simple one

Gilles Lenfant glenfant@bigfoot.com
Wed, 20 Feb 2002 20:13:26 +0100


<dtml-let parts=3D"stringVarToSplit.split('-')"
              part1=3D"parts[0]"
              part2=3D"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 -----=20
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=20
: enough in Perl but this Zope server happens to be on a Wintendo 2000 =
box=20
: and I haven't been able to get perl working correctly with Zope. Is =
there=20
: an easy way to split a variable with dtml?
:=20
: "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=20
: been a great book to start with, but I need something that's a little =
more=20
: in depth. I've seen a few more books on Amazon and I'm thinking about=20
: buying the Zope Bible to keep me busy until Dieter's book comes out. =
Does=20
: anybody have any suggestions?
:=20
: Rick
:=20
:=20
:=20