[Twisted-Python] Page Templates (Zope) with twisted.web

Itamar Shtull-Trauring twisted at itamarst.org
Tue Apr 30 06:08:47 EDT 2002

Tim Chase wrote:

 > I experimented briefly with twisted several months ago. After
 > banging my head against the Zope wall for a while, I am back to
 > twisted. One ray of hope in the Zope confusion was Zope Page
 > Templates (ZPT). According to
 > http://www.zopelabs.com/cookbook/998065931, ZPT can be used outside
 > of Zope. I can kind of envision this, but I am not yet twisted
 > enough. Is anyone already working on using Page Templates within a
 > twisted web?

At some point I might try to do it. The main issue is how to deal with
expressions that returns Deferreds. The options are:

1. Render page templates in threads
2. Use stackless
3. Hack the rendering loop so that it can deal with Deferreds correctly.

(2) is coolest, but problematic due to stackless' cross-platform issues. 
(1) is probably slowest option, (3) may be difficult to do, depending on 
how the code is structured.

More information about the Twisted-Python mailing list