Hello,

On Fri, Feb 6, 2009 at 9:03 PM, Jonathan Vanasco <[email protected]>wrote:

>
> ie -- instead of passing in a file, passing in a string?
>
> the only way i can think of this right now is with a tmpfile, and i'd
> like to avoid that.
>
I'm pretty sure that methods must return string and that's the only
requirement on them.

That basically means you can use template engines directly. If it is mako
something like that should work:

from mako.template import Template
print Template("hello ${data}!").render(data="world")

Example was shamelessly take from first page of
http://www.makotemplates.org/.

-- 
Dalius
http://blog.sandbox.lt

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"pylons-discuss" 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/pylons-discuss?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to