[ZPT] spacify?

Marc Lindahl marc at bowery.com
Tue Jan 6 03:03:23 EST 2004


aw... you gotta be kidding!  All those nice keywords in DTML weren't 
ported to ZPT?  Sheesh, two steps forward, six steps back! :)

thanks, though... you should put that one in the cookbook!

On Tuesday, January 6, 2004, at 02:38  AM, Fred L. Drake, Jr. wrote:

>
> Marc Lindahl writes:
>> like you can do in DTML... it turns '_' into ' ' in a string.
>
> Ah... makes me so glad I never learned DTML.  ;-)  This should do what
> you want:
>
> <span tal:define='s string:foo_bar_bat_baz_splat'
>       tal:content='python: s.replace("_", " ")' />
>
>
>   -Fred
>
> -- 
> Fred L. Drake, Jr.  <fred at zope.com>
> PythonLabs at Zope Corporation
>
> _______________________________________________
> ZPT mailing list
> ZPT at zope.org
> http://mail.zope.org/mailman/listinfo/zpt




More information about the ZPT mailing list