Lukasz Szybalski wrote:
> One more question on +var_name+:
> - Do I actually call the file "+var_name+.txt_tmpl" ? Which variable
> is it going to use? (there were license, description, myurl.....many
> more)?
Yes, +var_name+.txt_tmpl will name the file whatever the value of the
variable "var_name" is. It's like $var_name, except easier to put in
filenames.
> - Or do I call it +myurl+.txt_tmpl . If this is the case since
> "var[myurl] is a list how is it going to loop through the
> vars['myurl'] ?
If you have a list then this won't work -- you'll have to do something
like (in a post method):
for filename in vars['myurl']:
# or whatever you have to do to instantiate this, I'm not sure:
content = Template(filename=source_filename).substitute(**vars)
self.ensure_file(filename, content)
--
Ian Bicking : [EMAIL PROTECTED] : http://blog.ianbicking.org
_______________________________________________
Paste-users mailing list
[email protected]
http://webwareforpython.org/cgi-bin/mailman/listinfo/paste-users