Hopefully most of you know that there has been long debate on the
topic of Python Templating, and there are a LOT of intermediate
template languages as well as Python code generators as a consequence
of this debate.
Unfortunately (or Fortunately) depending on your view point - Python
does not support scripting tags so it cannot enter and leave the
interpreter to output plain text within loops and so forth. This is
mostly because Python was intended as an application language.
What this means however, is that that the task of separating
presentation logic from display logic in Python isn't as easy as most
of us would like. If you haven't used Python for web programming then
this topic probably doesn't really affect you in any way shape or
form; but if you do then hopefully this will be good news to you.
Over the weekend and last week myself and a few of my friends embedded
PHP into a Python module. Upon import of the module the PHP shared
object binary is initialized and can be used / re-used for the
duration of the Python program.
We are working on the logic to finish marshaling Python types to PHP
types in C, and displaying warnings properly between the two
languages.
After Marshaling is done I would like to write an integration specific
to Twisted/Twisted Web to serve PHP from twisted in an efficient
manner.
Hopefully this will offer a more robust, more maintained, and better
documented alternative to the 20+ template languages listed here:
http://wiki.python.org/moin/Templating.
I need to write a makefile and I'll try to get the source up on GITHUB
by next weekend.
Cheers!
-Ben DeMott