[Zope3-dev] Using PythonPage as "script" (example modification)

Iwan van der Kleyn zope at vanderkleyn.com
Mon May 24 18:18:34 EDT 2004


First of all, congrats to you all for Zope3. It's turning into an 
amazing piece of work.

Where Zope2 is rather baroque, Zope 3 seems to be rather puritan in its 
outlook on things. TTW development now seems to be looked upon with  
abhorrence, for example :-) Seriously,  I consider TTW not just to be 
for 'scripters" (whoever that may be), but especially suited for rapid 
prototyping.  In Zope2 I can create a minimally functional stub site 
really quickly with some ztp's, scripts and lots of sticky tape. I'm 
missing that in Zope3 (scripting functionality is mentioned in TODO.txt)

However, I checked out the PythonPage component and discovered it was 
rather easy to modify. So I modified it to have a PythonPage evaluated 
from within a ZTP tal expression. So I can now call a script from a ztp 
and iterate over its returnvalues with tal:repeat etc etc.

You can find the example implementation on 
http://zope.org/Members/ivdkleyn/index_html/document_view. It contains 
some additions to the unit/doctests.

I realize such a component goes against the grain of the component 
arhcitecture. But it facilitates easy scripting and with minimal effort.

Any comments or thoughts?

Regards,
Iwan






More information about the Zope3-dev mailing list