I am a newbie for mako and want to create .py scripts programatically from a template .py script. So does something like this work
Lets say my template script has a variable var1 = ${var1}
, that takes say integer values. I want to be able to create many copies with particular values of var1
variable. How I create a caller that declares var1
as a list, say var1 = [1,2,3,4]
and iterate over the values and pass them to the template. How does one do this, does something like render(**locals())
work?
Also I am unable to download Mako, is there a windows python 2.7 download available?