[Zope] Migration to Zope

Dan L. Pierson dan@control.com
Thu, 19 Apr 2001 14:47:33 -0400


--On Thursday, April 19, 2001 04:03:28 PM +0100 Chris Withers 
<chrisw@nipltd.com> wrote:

> Luciano Ramalho wrote:
>>
>> Chris Withers wrote:
>> > Sorry, but they are two completely seperate products, ask Evan ;-)
>>
>> Can you tell me how they differ? I thought py-methods were just a
>> previous manifestation of py-scripts.

Access to other modules in py-methods was only via a hacked up '_'
object sort of like the DTML _ namespace.  E.G. _.string.split(...).
Access to other modules in py-scripts is via import with security
restrictions on what you can import.  The default set of allowed
modules is small, but it's pretty easy to extend.

Py-methods could take a self argument that was passed implicitly.  Exactly
what it was is kind of vague.  Py-scripts have an explicit Bindings tab that
lets you specify the names for the various things you might want self to 
mean:
acquisition context, container, the script itself, the DTML namespace, the
traversal context.

Py-methods had a test tab that was basically useless because there was no
way to pass arguments to the method.  Py-scripts have fixed this.

Also, py-scripts have a well defined file system representation.  Py-methods
had one, but it was a good deal hackier.