[Zope-dev] Python Methods commited

Evan Simpson evan@4-am.com
Sat, 18 Dec 1999 10:19:46 -0600


"Phillip J. Eby" wrote:

> Now that PythonMethods are in the Zope CVS, I may take a whack this weekend
> at adding another option to them, if other people don't find it offensive
> (and perhaps even if they do... ;) ).  ASP syntax.  That is:
>
> <% if foo>1: %>
> The value of foo is <%= foo %>.
> <% else: %>
> Foo isn't worth much.
> <% end if %>
>
> I already have a robust ASP->Python translator I've had in production use
> for years, so incorporating it into PythonMethods should be just a matter
> of adding a syntax option, and a call to the translator at just the right
> moment.  The translator makes up for the infamous ASP whitespace problem by
> implementing block end syntax (end if, end for, end while, end def, etc.).

Sounds more like you might want to subclass PythonMethod to make a new ASP
Method class (and perhaps ASP Document?).  Depending on what your syntax
allows, you might even want to work with DTML instead.  Then again, there's
always this mysterious new multi-syntax thing DC has been teasing us with ;-)

Cheers,

Evan @ 4-am