[ZPT] Python String Manipulation in SQL results
ianb at colorstudy.com
Mon Nov 3 13:01:56 EST 2003
On Nov 3, 2003, at 11:57 AM, Philip Kilner wrote:
> Am happily listing from the dB with: -
> <span tal:replace="result/Email">Email goes here</span>
> What is the syntax to use Python's "rstrip" function to strip the
> pesky padding off the end? (Am having trouble with nesting, I think)
.rstrip(), like tal:replace="python: result.Email.rstrip()", or just
tal:replace="result/Email/rstrip" I suppose (using TALES'
auto-calling). .lstrip() and .strip() are other versions.
Ian Bicking | ianb at colorstudy.com | http://blog.ianbicking.org
More information about the ZPT