Re: 2.2 equivalents for transform.expr() and transform.dynamic()?

"Jonathan Ellis" <[email protected]> Sun, 08 Apr 2007 21:27:01 -0700
Newsgroups gmane.comp.python.spyce.general
Message-ID <[email protected]>
That part of transform is now in the response module.  Something like
this:

[[\
class MyOut:
  def __init__(self, out):
    self.out = out
    self.writeStatic = out.write
    self.writeExpr = self.write 
  def write(self, s):
    self.out.write(Utf8ify(ReplaceHtmlSpecials(s))

response.addFilter(MyOut)
]]

Each response filter is passed the stream of the next-lowest filter
("out").  At the bottom is a spyceUtil.BufferedOutput.

On Sun, 8 Apr 2007 20:02:55 -0400, "Philip Semanchuk"
<[email protected]> said:
> Hi Jonathan,
> In my current 2.0 install I have a taglib that defines functions called 
> Utf8ify() and ReplaceHtmlSpecials() and then passes them to the 
> transform module like so:
> 
> transform.expr((Utf8ify, ReplaceHtmlSpecials))
> transform.dynamic((Utf8ify, ReplaceHtmlSpecials))
> 
> 
> What's the 2.2 equivalent? I've tried this but the functions don't seem 
> to get called, although I don't get an error either:
> 
> text.expr((Utf8ify, ReplaceHtmlSpecials))
> text.dynamic((Utf8ify, ReplaceHtmlSpecials))
> 
> 
> Thanks
> Philip
> 
> 
> -------------------------------------------------------------------------
> Take Surveys. Earn Cash. Influence the Future of IT
> Join SourceForge.net's Techsay panel and you'll get the chance to share
> your
> opinions on IT & business topics through brief surveys-and earn cash
> http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
> _______________________________________________
> Spyce-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/spyce-users

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV