Mercurial > hg > MakeItSo
comparison makeitso/template.py @ 67:a0f7bfa98755
API templates now hobble along on their own two feet
| author | Jeff Hammel <jhammel@mozilla.com> |
|---|---|
| date | Fri, 07 Jan 2011 10:58:28 -0800 |
| parents | 7821c82772f5 |
| children | a75138a952d0 |
comparison
equal
deleted
inserted
replaced
| 66:7821c82772f5 | 67:a0f7bfa98755 |
|---|---|
| 136 vars = self.get_variables(**variables) | 136 vars = self.get_variables(**variables) |
| 137 self.pre(**vars) | 137 self.pre(**vars) |
| 138 self.check_missing(vars) | 138 self.check_missing(vars) |
| 139 | 139 |
| 140 # do the substitution | 140 # do the substitution |
| 141 PolyTemplate(self.templates, | 141 template = PolyTemplate(self._templates, |
| 142 output=self.output, | 142 output=self.output, |
| 143 interactive=self.interactive, | 143 interactive=self.interactive, |
| 144 variables=vars) | 144 variables=vars) |
| 145 template.substitute() | |
| 145 | 146 |
| 146 self.post(**variables) | 147 self.post(**variables) |
| 147 | 148 |
| 148 def post(self, **variables): | 149 def post(self, **variables): |
| 149 """do stuff after interpolation""" | 150 """do stuff after interpolation""" |
