Render TAL from restricted python

Is it possible to 'render' TAL from restricted python?

so, if

talcontent = '<h1 tal:content="context/Title/><p>or maybe: ${context/Desctription}</p>

then:

html-content = <h1>My Title</h1><p>or maybe: My Description</p>

Why would one be interested to do that?
If you are in Python then use the standard Python string interpolation.
I am getting even more grey hair from such code. Your approach is broken.

1 Like

You should use macros for that. METAL is the macro language behind it.

Thanks a lot