[Zope-dev] Python Methods commited

Michel Pelletier michel@digicool.com
Mon, 20 Dec 1999 09:54:21 -0500


> -----Original Message-----
> From: Evan Simpson [mailto:evan@4-am.com]
> Sent: Saturday, December 18, 1999 11:20 AM
> To: Phillip J. Eby
> Cc: Christopher Petrilli; zope-dev@zope.org
> Subject: Re: [Zope-dev] Python Methods commited
> 
> 
> "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 ;-)

Format, actually.  I haven't taken into consideration the use case that
the managed content can be a script, I'm not sure if I want to go into
that realm, just yet.  What I'm working on can be scripted at both the
parsing end and the rendering end though, I suppose it could be done.

-Michel
> 
> Cheers,
> 
> Evan @ 4-am
> 
> 
> _______________________________________________
> Zope-Dev maillist  -  Zope-Dev@zope.org
> http://lists.zope.org/mailman/listinfo/zope-dev
> **  No cross posts or HTML encoding!  **
> (Related lists - 
>  http://lists.zope.org/mailman/listinfo/zope-announce
>  http://lists.zope.org/mailman/listinfo/zope )
>