Looking for a Python PHP programmer

Roger Binns rogerb at rogerbinns.com
Fri Jul 9 03:21:56 EDT 2004


Peter Maas wrote:
> I think in Cheetah it's .capitalize and .escape (details may vary).

Yes, but that is because you know they are available as string
methods :-)  Smarty is simpler and I think the syntax is
better for expressing that sort of thing.  It isn't as "powerful"
as a result, but if you never use the "power" it doesn't matter.

> The elegance of the Cheetah way is how they map Python code
> to placeholders. Every method and every field of an object can
> be addressed in a Cheetah template.

But that mostly matters to programmers.  If a non-programmer is
reading/writing the template, then generally they care about
what fields are available and various formatting options (such
as defaults, case conversion, truncation etc).  I think Smarty
expresses that in a simpler way, but at the cost of not having
methods etc.

> But it's of course a neat idea to combine PHP and Python given
> the overwhelming PHP predominance at ISPs.

I was suprised at how well the XML-RPC worked between the two
languages.  I was even doing my state management and security
in Python which PHP passed on to the browser as a cookie.

It meant I could also do things like session timeouts in the
Python.  PHP was only used for display.

Roger





More information about the Python-list mailing list