Essence'
相反,我只需要能够将动态语言代码嵌入到文件中,在运行时隔离它,评估并插入结果。换句话说,这与将动态代码插入HTML的PHP模型非常相似。我不想使用PHP,因为Python更容易作为更大项目(IronPython或Jython)的一部分分发
所以问题是,如何最好地实现以下内容:
<code>Python goes here</code> Lots of essence <code>Python</code> prime code goes here
Mako ,及 Cheetah
here 这是一个关于如何自己实现基本模板的小教程。请记住,需要修改示例以适合您的特定项目/需求。