On Jun 16, 9:53 pm, kretik <[EMAIL PROTECTED]> wrote: > I've been trying to coax this class to use something other than the > default '$' but it seems setting it to something else has no discernible > effect. Is it necessary to inherit from the class to do this?
Yes, subclassing is the intended way to produce variants of Template with a different delimiter. >>> import string >>> class PercentTemplate(string.Template): delimiter = "%" >>> s = PercentTemplate('Move %piece to %position') >>> s.substitute(piece='pawn', position='K4') 'Move pawn to K4' Raymond -- http://mail.python.org/mailman/listinfo/python-list