# HG changeset patch # User Jeff Hammel # Date 1273519620 25200 # Node ID e4637479911926cd25529fa8517124c920129674 # Parent e700bd2ec2894ce0bc0da10036b4068407c603fe do the interpolation diff -r e700bd2ec289 -r e46374799119 licenser/licenses.py --- a/licenser/licenses.py Mon May 10 12:17:38 2010 -0700 +++ b/licenser/licenses.py Mon May 10 12:27:00 2010 -0700 @@ -1,5 +1,6 @@ import os from datetime import datetime +from string import Template class License(object): """Abstract base class for a license""" @@ -51,7 +52,9 @@ # print the license g = file(self.template) for line in g.readlines(): - print >> f, '# %s' % line.rstrip() + line = line.rstrip() + _template = Template(line) + print >> f, '# %s' % _template.substitute(**variables) g.close() # print the rest of the file