Python embedded like PHP

Duncan Booth duncan at NOSPAMrcp.co.uk
Wed Mar 20 09:05:30 EST 2002


Paul Rubin <phr-n2002a at nightsong.com> wrote in 
news:7xk7s7mpiy.fsf at ruckus.brouhaha.com:

> Geez, I find all this pseudo-HTML horrendous.  Why not just embed
> normal looking code in <?  ?> tags the way PHP does it?  Do WYSIWYG
> editors have a problem with that?  If worse comes to worse, embed
> the Python code with the kinds of tags used for Javascript.  The
> WYSIWYG editors should be used to Javascript by now.

I think you are missing the point. With <? ?> or javascript, the remaining 
HTML in the file very often isn't valid HTML. In particular you very often 
get situations where the opening and closing tags don't match. Consider 
with your scheme how you might alter the attributes on the <body> tag while 
leaving exactly one body tag visible for the wysiwyg editor?

ZPT makes this easy provided (and it is a big provided) the wysiwyg editor 
both preserves and ignores unknown attributes.

-- 
Duncan Booth                                             duncan at rcp.co.uk
int month(char *p){return(124864/((p[0]+p[1]-p[2]&0x1f)+1)%12)["\5\x8\3"
"\6\7\xb\1\x9\xa\2\0\4"];} // Who said my code was obscure?



More information about the Python-list mailing list