Re: [Zope] Underscore Caracter

2000-10-07 Thread Kapil Thangavelu
Chris McDonough wrote: Yes. Thank you. Note however that methods of modules accessed via the underscore namespace may be filtered individually, so although 'replace' exists as a method of the Python string module, this does not necessarily make it accessible implicitly through Zope via

Re: [Zope] Underscore Caracter

2000-10-07 Thread knight
Chris McDonough wrote: Yes. Thank you. Note however that methods of modules accessed via the underscore namespace may be filtered individually, so although 'replace' exists as a method of the Python string module, this does not necessarily make it accessible implicitly through

Re: [Zope] Underscore Caracter

2000-09-06 Thread Duncan Booth
Tino Wildenhain wrote: Turn "asd_asd" into "asd asd" and output: dtml-var "_.string.join(_.string.split('asd_asd', '_'))" I've seen this on plenty lines of digicools code and wondered about if this is more efficient then using just string.replace() ? I would say string.replace()

Re: [Zope] Underscore Caracter

2000-09-06 Thread Toby Dickenson
On Tue, 5 Sep 2000 20:23:47 -0600, "T.J. Mannos" [EMAIL PROTECTED] wrote: Now, who do I have to beat up to get the 're' module added to the namespace variable??? :) Not a good idea its too easy for a buggy regex to eat up lots of memory and processor time. Toby Dickenson [EMAIL PROTECTED]

Re: [Zope] Underscore Caracter

2000-09-05 Thread Tino Wildenhain
Hi Chris, Chris McDonough wrote: Hi Marcus, This is untested. Turn "asd asd" into "asd_asd" and output: dtml-var "_.string.join(_.string.split('asd asd'), '_')" Turn "asd_asd" into "asd asd" and output: dtml-var "_.string.join(_.string.split('asd_asd', '_'))" I've seen this

RE: [Zope] Underscore Caracter

2000-09-05 Thread T.J. Mannos
Of Chris McDonough Sent: Monday, September 04, 2000 5:56 PM To: Marcus Mendes Cc: [EMAIL PROTECTED] Subject: Re: [Zope] Underscore Caracter Hi Marcus, This is untested. Turn "asd asd" into "asd_asd" and output: dtml-var "_.string.join(_.string.split('asd asd'), '_')"

RE: [Zope] Underscore Caracter

2000-09-05 Thread Chris McDonough
On Tue, 5 Sep 2000, T.J. Mannos wrote: Hmm.. Shouldn't that be: _.string.join(_.string.split('asd asd'), ' '), '_') The second argument is implicit on string.split (it defaults to a single space). But your way works too. Or, alternatively (and more intuitively), _.string.replace('asd

RE: [Zope] Underscore Caracter

2000-09-05 Thread T.J. Mannos
lto:[EMAIL PROTECTED]]On Behalf Of Chris McDonough Sent: Tuesday, September 05, 2000 7:54 PM To: T.J. Mannos Cc: Marcus Mendes; [EMAIL PROTECTED] Subject: RE: [Zope] Underscore Caracter On Tue, 5 Sep 2000, T.J. Mannos wrote: Hmm.. Shouldn't that be: _.string.join(_.string.spli

RE: [Zope] Underscore Caracter

2000-09-05 Thread Dennis Nichols
At 9/5/00 09:54 PM, Chris McDonough wrote: It should be noted that _.string.replace() is not mentioned in the DTML reference guide. If it exists, it should be used. Sigh. I can't wait for the Zope Book to come out, I'm going to be the first buyer. ;-) Not that I would expect it to exist, but

RE: [Zope] Underscore Caracter

2000-09-05 Thread Chris McDonough
Yes. Thank you. Note however that methods of modules accessed via the underscore namespace may be filtered individually, so although 'replace' exists as a method of the Python string module, this does not necessarily make it accessible implicitly through Zope via _.string.replace. It happens

Re: [Zope] Underscore Caracter

2000-09-04 Thread Chris McDonough
Hi Marcus, This is untested. Turn "asd asd" into "asd_asd" and output: dtml-var "_.string.join(_.string.split('asd asd'), '_')" Turn "asd_asd" into "asd asd" and output: dtml-var "_.string.join(_.string.split('asd_asd', '_'))" On Sun, 3 Sep 2000, Marcus Mendes wrote: Hello, I need