Kevin Dangoor wrote:
> On 10/18/05, pierrebai <[EMAIL PROTECTED]> wrote:
>
>>One wonders why you need Kid at all for text processing. Seems the ${}
>>syntax for embedding python would be enough. Some things would be more
>>verbose, but you gain the full flexibiliy of python.
>
>
> Conditionals and for loops still apply to text.
>
> Granted, these days most people can (and do) receive HTML email. But
> for those times when you do need to generate a plain text email
> message, you may still need a for loop.
For the case of email, I use some (limited but sufficient) code to turn
HTML into text: http://svn.w4py.org/ZPTKit/trunk/ZPTKit/htmlrender.py
I generally double-render, with a variable that indicates if the HTML or
plaintext version is being rendered -- often there's little tweaks that
only apply to one or the other. Then the two are packaged up as MIME
alternatives. I use this with ZPT, but the issues are the same.
Ultimately the result is better than plaintext-only emails anyway, IMHO.
Except of course for the spam trapping :-/
--
Ian Bicking | [EMAIL PROTECTED] | http://blog.ianbicking.org