Nicolas Riedel schrieb:
> Hi Group,
>
> I'd like to save some pages, generated with kid, for later use, without
> showing it to the user.
>
> Is there a way to just use kid to save a/many files to disk?
from turbogears import view
view.load_engines()
substitutions = dict(foo='bar', ...)
s = view.render(substitutions, 'mypkg.templates.foo')
f = open('foo.html', 'w')
f.write(s)
f.close()
Chris
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"TurboGears" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/turbogears?hl=en
-~----------~----~----~----~------~----~------~--~---