Re: [Zope] parsing strings in DTML

2000-06-26 Thread Jeff K. Hoffman
On Mon, 26 Jun 2000, Timothy Wilson wrote: > On Mon, 26 Jun 2000, Rik Hoekstra wrote: > > > try something like (untested): > > > > > > > > for parsing the string > > But what if "parse_address" comes from a SQL query? Like this: > > > , ... etc. > > Don't I run into trouble with nested

Re: [Zope] parsing strings in DTML

2000-06-26 Thread R. David Murray
On Mon, 26 Jun 2000, Timothy Wilson wrote: > > , ... etc. > > Don't I run into trouble with nested DTML here? No, inside the quotes you are in python, not dtml, so no nesting is required. Just reference parse_address (though you've got it in the wrong place if it already has a value...) --R

Re: [Zope] parsing strings in DTML

2000-06-26 Thread Bill Anderson
Timothy Wilson wrote: > > On Mon, 26 Jun 2000, Rik Hoekstra wrote: > > > try something like (untested): > > > > > > > > for parsing the string > > But what if "parse_address" comes from a SQL query? Like this: > > > , ... etc. > > Don't I run into trouble with nested DTML here? Untested

Re: [Zope] parsing strings in DTML

2000-06-26 Thread Timothy Wilson
On Mon, 26 Jun 2000, Rik Hoekstra wrote: > try something like (untested): > > > > for parsing the string But what if "parse_address" comes from a SQL query? Like this: , ... etc. Don't I run into trouble with nested DTML here? -Tim -- Tim Wilson | Visit Sibley online: | Ch

Re: [Zope] parsing strings in DTML

2000-06-26 Thread Timothy Wilson
On Mon, 26 Jun 2000, Rik Hoekstra wrote: > >Please correct me if I'm wrong, but I could probably do >"REQUEST.set('parsed_address', _.string.join(old_address, '$')"> except for > >the fact that getting "old_address" (the $-separated one) would require its > >own statement. I can't nest s so how

Re: [Zope] parsing strings in DTML

2000-06-26 Thread Rik Hoekstra
> >I'm working on what should be a simple problem. > >I pulling an address out of an ldap query and the data is in the form of a >$-separated string. Example: > >101 Main St.$Anytown$MN$12345 > >Please correct me if I'm wrong, but I could probably do "REQUEST.set('parsed_address', _.string.join(o

Re: [Zope] parsing strings in DTML

2000-06-26 Thread R. David Murray
On Mon, 26 Jun 2000, Timothy Wilson wrote: > "REQUEST.set('parsed_address', _.string.join(old_address, '$')"> except for This is exactly correct. Inside the quotes you are in python, and so you can reference variables from the namespace by their unadorned name. > Second question... Once I've go

[Zope] parsing strings in DTML

2000-06-26 Thread Timothy Wilson
Hi everyone, I'm working on what should be a simple problem. I pulling an address out of an ldap query and the data is in the form of a $-separated string. Example: 101 Main St.$Anytown$MN$12345 Please correct me if I'm wrong, but I could probably do except for the fact that getting "old_addr