|
Project Information
Featured
Downloads
|
AboutProject is built on Java and jython mashup to extend StringTemplate library functionality (popular among ANTLR community) and bring to it the power of python language, which can turn out to be quite handy. The aim is to build a library that can support and successfully implement interfaces like StringTemplate and StringTemplateGroup as PyTemplate or PyTemplateGroup for further interaction with code in jython, and even reverse inter-operation with common string templates (i.e. accessing a certain StringTemplate from jython code). Installation
UsageMany use cases can be taken directly form tests. For example, ...
String pytemplates = "def page():" + newline + indent + "return 'test'"
+ newline + newline;
PyTemplateGroup group = new PyTemplateGroup("test", new StringReader(pytemplates));
StringTemplate st = group.getInstanceOf("page");
System.out.println(st.toString());
|