Allow TAL to be used without Zope

Bug #142438 reported by Doug Hellmann
2
Affects Status Importance Assigned to Milestone
Zope 2
Fix Released
Low
Unassigned

Bug Description

I am working on adding template support to HappyDoc 3.x (http://happydoc.sourceforge.net) using TAL. I started wtih PageTemplates, but I would very much prefer to be able to avoid redistributing any more of the Zope source base than is absolutely necessary.

I have been able to build my own expression engine fashioned after the one in TALES.py. This has allowed me to get away with distributing on the TAL package and a few supporting modules copied from the PageTemplate package.

I did need to make one small change to TALInterpreter.py in order to avoid a dependency on the DocumentTemplate package (see below). It would be nice if this was included in future releases, so I can keep up to date without having to maintain a modified code tree.

Thanks,
Doug

diff /home/dhellmann/Personal/Devel/HappyDoc3/happydoclib/docset/docset_TAL/TAL/TALInterpreter.py lib/python/TAL/TALInterpreter.py
25,28c25
< if sys.modules.has_key('Zope'):
< from DocumentTemplate.DT_Util import ustr
< else:
< from ustr import ustr
---
> from DocumentTemplate.DT_Util import ustr

Revision history for this message
Hanno Schlichting (hannosch) wrote :

Today TAL can be used either by using SimpleTAL, Chameleon or zope.tal and a couple of Zope libraries.

Changed in zope2:
status: New → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.