[Zope3-dev] Re: Zope 3 Newsletter: Issue 10

Paul Winkler pw_lists at slinkp.com
Mon Sep 8 13:23:24 EDT 2003


On Mon, Sep 08, 2003 at 06:04:48PM +0200, Max M wrote:
> We allready have Python in PageTemplates. Excepts that it is forced to 
> be one liners. This can be pretty tiresome too. If you see how 
> tal:define="some_var python:somecode()" is used in Plone it too gets 
> ugly real fast. A Python block with the definitions would definitely be 
> an improvement.

Hmm, but you can't.  A z3 version of plone would probably consist 
largely of templates in software space, yes? no? You wouldn't build
something as large as plone using "active content", so your suggestion
is not an option.

> I assume that there will be no "print" statement in the Python blocks. 

The initial example posted in the newsletter showed a print statement.
Maybe this bears reconsideration.

> But I think that each Python block needs it's own namespace, and some 
> way to explicitly state wich variables are exported to the tal 
> namespace,  else it will quickly become a clutter of variable names that 
> are mixed up in the template, and it can be hard to follow where each 
> variable comes from.

interesting idea. Maybe "global" could be (ab)used for this?

-- 

Paul Winkler
http://www.slinkp.com
Look! Up in the sky! It's SQUID IDIOCY!
(random hero from isometric.spaceninja.com)



More information about the Zope3-dev mailing list