jd a écrit : > I'd like to create a program that takes files with "jsp-like" markup > and processes the embedded code (which would be python) to produce the > output file. There would be two kinds of sections in the markup file: > python code to be evaluated, and python code that returns a value that > would be inserted into the output. > > This seems like it would be straightforward in python, and maybe > there's even a library that I could use for this, but as a newbie to > Python, I don't know the landscape very well. I am not looking for a > big framework, just something small and simple that will do just this > job. Suggestions or pointers would be greatly appreciated.
There are already quite a few Python templating solutions. You may want to look for: - Python server pages - Mighty - Mako - Jinja - Genshi - Cheetah - Newov - Zope Page Templates - SimpleTAL (standalone implementation of ZPT) - (add your favorite Python templating system here) -- http://mail.python.org/mailman/listinfo/python-list