As Zope developers build increasingly complex applications,
they find that DTML is a poor way to implement non-trivial
application logic. DTML was never really intended for complex
logic, but lack of an alternate way to express through-the-web
editable logic has caused the "source" of many sites to become
ugly and difficult to maintain as site developers push the
envelope of DTML.
Of course, these developers could write ExternalMethodsx or
PythonProductsx instead, but for various reasons they often opt
for the through-the-web convenience of DTML (even at the expense
of clarity). Applications could become much more maintainable
(and the outer limits of DTML pushed less) if significant logic
were moved out of DTML and pushed into something more suited to
The PythonScripts Product provides objects that can encapsulate
more complex logic expressed in Python while retaining the
benefits that people like about DTMLMethodsx. There is already a
prototype implementation of PythonScripts (PythonMethodsProductx)
in fairly wide use. We
propose to resolve the outstanding issues and make Python Scripts
available as a standard object type in the Zope platform.
Core Python Script support will give developers "out of the
box" the ability to better manage the complexity of their
applications by putting significant logic into Python Scripts
and leaving presentation issues to DTML. Python Script objects:
Will allow logic to be written in a language suitable for
Will be editable via the Web. FTP and DAV support are outside
the immediate scope of the project (but may be added later
after the initial release).
Will be tightly integrated with the Zope security machinery.
Because they will be editable via the web, they will enforce
security restrictions very similar to those enforced in DTML.
They will not allow access to arbitrary modules or potentially
dangerous system or runtime resources.
Can be used as ZClassx methods as well as stand-alone objects.
Will implement the MethodObjectInterface, which is an interface
that has been in development to make it easier to work with
method-like objects in a standard way and provides support for
common problems specific to methods (such as control of binding).
Will provide synchronized distribution of logic for free when
used with ZEO.
Please see the RiskFactors document.
This project will provide an implementation of Python Script
objects to be included in the Zope core and associated
This project is expected to produce:
A stable implementation of Python Script objects to be included
in a future release of Zope
Zope help system pages for each screen in the user interfaces
of the objects in the product
API documentation for inclusion in the help system covering
the public interfaces of Python Script objects
Documentation suitable for inclusion as a section of the Zope
Content Manager's Guide covering the use of Python Scripts.
This should include a detailed explanation of the "rules" that
govern what you can and cannot do in Python Scripts.