n00b question: Possible to pass lists to a Template class?

2009-05-13 Thread Wells
Is it possible to pass a list to the Template.substitute method and use that in the template, like so.. g = string.Template(gametemplate) print g.substitute(recap = none, winner = game[winner], loser = game[loser]) Then in the template... bwinner.team Where winner.team would be the value of

Re: n00b question: Possible to pass lists to a Template class?

2009-05-13 Thread Wells
On May 13, 11:14 am, Wells we...@submute.net wrote: Is it possible to pass a list to the Template.substitute method and use that in the template, like so.. g = string.Template(gametemplate) print g.substitute(recap = none, winner = game[winner], loser = game[loser]) Then in the template...

Re: n00b question: Possible to pass lists to a Template class?

2009-05-13 Thread Rhodri James
On Wed, 13 May 2009 17:22:32 +0100, Wells we...@submute.net wrote: On May 13, 11:14 am, Wells we...@submute.net wrote: Is it possible to pass a list to the Template.substitute method and use that in the template, like so.. g = string.Template(gametemplate) print g.substitute(recap = none,

Re: n00b question: Possible to pass lists to a Template class?

2009-05-13 Thread MRAB
Rhodri James wrote: On Wed, 13 May 2009 17:22:32 +0100, Wells we...@submute.net wrote: On May 13, 11:14 am, Wells we...@submute.net wrote: Is it possible to pass a list to the Template.substitute method and use that in the template, like so.. g = string.Template(gametemplate) print