PyMeld / CherryPy

8 views
Skip to first unread message

Tom Fillmore

unread,
Oct 17, 2005, 11:58:01 AM10/17/05
to cherrypy-users
Hi, all -

I'll admit to this likely being a stupid question but I would like to
use PyMeld with CherryPy and am having a hard time seeing how to
integrate it since it does not have a render function. The docs for
PyMeld all show a 'print' statement but that just seems wrong in the CP
context. Would yield work here? Can anyone share with me how they did
this? Obviously this is not a strongpoint for me...

Thanks in advance....

Jus' call me

'Newbie' Tom 8-)

N. C. Deepak Ramesh

unread,
Oct 17, 2005, 12:39:33 PM10/17/05
to cherryp...@googlegroups.com
Hi Tom,

>I'll admit to this likely being a stupid question but I would like to
>use PyMeld with CherryPy and am having a hard time seeing how to
>integrate it since it does not have a render function. The docs for
>PyMeld all show a 'print' statement but that just seems wrong in the CP
>context. Would yield work here? Can anyone share with me how they did
>this? Obviously this is not a strongpoint for me...
>
>
Presuming you know how to form a Meld object and suitably play around
with it, it would just be a case of :

<pseudocode>
tmpl = Meld(templatestring or template file)

# Do work with template
...

return tmpl
</pseudocode>

that is, return the final template/page after you have done your work on it.

And just a bit of friendly advice, I would suggest you get yourself
familiar with Cherrypy itself before going it to templating systems.

HTH,

Deepak

Tom Fillmore

unread,
Oct 17, 2005, 12:49:43 PM10/17/05
to cherrypy-users
<Light going on>
Thanks, that did help.
I know that the templating (for want of a better word) can be done
directly through CP,
I just think it a bit easier to work with template languages at
this point. However, I also think it
worthwhile to take the advice of those who have been down both
roads (with/without templates) so
I will try it both ways and go from there.
</Light going on>

Thanks again

Tom

Reply all
Reply to author
Forward
0 new messages