CubicTemp

CubicTemp is an elegant templating system written in Python. What I like about it was the fact that it had just the basic minimum necessary. In 15 minutes I knew the language and was confident I would be pretty productive in it.

I was in search of a templating system that was not specifically tied to any particular web system. I basically needed a substitution, a conditional structure and some sort of looping structure. Nothing more. CubicTemp was just prefect. It mean I did not have huge learning curve.

Since I was actually interested in using a basic template system with Jython and deploy on a servlet engine like Tomcat I had looked at systems like XMLC, Velocity, FreeMarker and Webmacro. Since a lot of the people had recommended Velocity I did look at it quite in detail. It is good. But I felt it was quite an overkill. I wasn't really in a mood to learn a new template language.

While CubicTemp was just right. It had one problem. It was written for Python 2.2 and Jython is only 2.1 Hmm,that basically meant I had to either port it, search for a new one or write my own. Well, I finally sat down to learn regular expressions. I did have goes at it before and I hardly needed to do anything more that write one to verify an email address. This time it was not going to be so simple.

Finally, I did learn the regular expression with help from the good RE HowTo . The nice thing was I understood enough of the code to understand how it was working and was finally able to port cubictemp.py to Jython. Hmm, this is interesting. I am definitely waiting eagerly for the new release of CubicTemp and Jython 2.2 :D

Get the modified copy of cubictemp.py

Comments
how about releasing it publicly ? I'm sure there are interested people.

Posted by: aadish on February 24, 2003 10:28 PM