[Zope] Using filesystem Python Scripts

Stacy Roberts Ladnier Stacy.Roberts@noaa.gov
Fri, 24 Jan 2003 08:52:07 -0600


This is a multi-part message in MIME format.
--------------DDC6E6EBCAC9B1B7FF2DECC3
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit

I am in the process of creating a Python Product for Zope with the
following directory structure under my Products directory.
                -FGDC
                    __init__.py
                     <all other .py modules that make up the metatypes
of the product>
                    -dtml
                           <my dtml forms>
                          manage_propertiesForm.dtml
                    -scripts
                         processProperties.py


I try to execute the script, processProperties, from inside
manage_propertiesForm.dtml. Right now, I am using a simple
        <dtml-var "processProperties">
call. However, I get a NameError saying that processProperties is not
defined. Here is my traceback:

            Traceback (innermost last):

           Module ZPublisher.Publish, line 98, in publish
            Module ZPublisher.mapply, line 88, in mapply
            Module ZPublisher.Publish, line 39, in call_object
            Module Shared.DC.Scripts.Bindings, line 252, in __call__
            Module Shared.DC.Scripts.Bindings, line 283, in _bindAndExec

            Module App.special_dtml, line 174, in _exec
            Module DocumentTemplate.DT_Util, line 201, in eval
            __traceback_info__: processProperties
            Module <string>, line 0, in ?
            NameError: name 'processProperties' is not defined

A Very simplified version of my script is here:

## Script (Python) "processProperties"
##bind container=container
##bind context=context
##bind namespace=_
##bind script=script
##bind subpath=traverse_subpath
##parameters=
##title=Process changes properties for validation before commitment to
property sheet
##

return 'abcd'

I have searched the world over to determine how to 'register/call' my
filesystem script from my dtml method with NO LUCK. Can someone please
guide me in the right direction? Thanks in advance.

--------------DDC6E6EBCAC9B1B7FF2DECC3
Content-Type: text/x-vcard; charset=us-ascii;
 name="Stacy.Ladnier.vcf"
Content-Transfer-Encoding: 7bit
Content-Description: Card for Stacy Ladnier
Content-Disposition: attachment;
 filename="Stacy.Ladnier.vcf"

begin:vcard 
n:Ladnier;Stacy
tel;work:228-688-1878
x-mozilla-html:FALSE
org:Anteon/NCDDC
adr:;;;Stennis Space Center;MS;;
version:2.1
email;internet:Stacy.Ladnier@noaa.gov
title:Software Engineer
fn:Stacy Ladnier, SCJP2, SCJD2
end:vcard

--------------DDC6E6EBCAC9B1B7FF2DECC3--