Hi All,

I'm proud to announce that after almost a year's development, the first
public release of Twiddler is available!

Twiddler is a simple but flexible templating system for dynamically
generating textual output. It comes with bindings for Zope 2 and should easily slot into a Zope 3 view in place of a ZPT.

The key features are:

- No need to learn a templating language.

- As simple as possible while still catering for all possible templating

- Configurable input parsing so source can be html, xml, plain text or
  anything you write an input parser for.

- Configurable output rendering so output can be rendered to a unicode
  string, an email, or anything you write an output renderer for.

You can find out more and download from here:


If you wish to ask questions, pass judgement or get help, please do so
in the following mailing list:


This is the first public release, so I'm looking for help with the

- Finding anything that should be possible in a templating system but
  isn't with Twiddler

- Packaging it up for easier distribution. I know nothing about eggs,
  distutils, etc, and so could do with help to package Twiddler so that
  it can be more easily installed.

Finally, here's a couple of quick examples:

from twiddler import Twiddler
t = Twiddler('''<body>
... <div id="title">A title</div>
... <select name="items">
... <option id="item">An item</option>
... </select>
... </body>''')

t['title'].replace('My title')
r = t['item'].repeater()
for i in range(1,4):
...   r.repeat('Item '+str(i),value=i,name=False)

print t.render()
<div id="title">My title</div>
<select name="items">
<option id="item" value="1">Item 1</option>
<option id="item" value="2">Item 2</option>
<option id="item" value="3">Item 3</option>

from twiddler.input.plaintext import PlainText
t = Twiddler('''To: $to
... <item>An item</item>
... ''',input=PlainText)

t['to'].replace('John Smith')
r = t['item'].repeater()
for i in range(1,4):
...   r.repeat('Item '+str(i),value=i,name=False)

print t.render()
To: John Smith
Item 1
Item 2
Item 3

Thanks for reading this far, I hope you enjoy it!



Simplistix - Content Management, Zope & Python Consulting
           - http://www.simplistix.co.uk

Zope-Announce maillist  -  Zope-Announce@zope.org

 Zope-Announce for Announcements only - no discussions

(Related lists - Users: http://mail.zope.org/mailman/listinfo/zope
Developers: http://mail.zope.org/mailman/listinfo/zope-dev )

Reply via email to