2007年04月28日 星期六 09:44
hi all 诸如这样一个模版$title $content 用指定元素名称的方式可以操作 from Cheetah.Template import Template t = Template(file="mytemplate.tmpl") t.title = "Greetings" t.content = "Hello, world!" print str(t) 但如果不确定元素名称,可以枚举出来吗 -- with kind regards
2007年04月28日 星期六 20:43
ro wrote: > hi all > > 诸如这样一个模版 >$title > $content > > > 用指定元素名称的方式可以操作 > from Cheetah.Template import Template > t = Template(file="mytemplate.tmpl") > t.title = "Greetings" > t.content = "Hello, world!" > print str(t) > > 但如果不确定元素名称,可以枚举出来吗 > 我也想知道
Zeuux © 2025
京ICP备05028076号