[Zope] accessing Python product classes from a Python script

Mitchell L Model mlm@acm.org
Thu, 13 Sep 2001 22:59:17 -0400


I've written some Python classes in a product (having given up on a 
ZClass approach).  Let's call the product Prod and one of the classes 
Cls.  I have a Python script in a Zope folder that calls 
manage_addCls, which is defined at the top level of Cls.py.  How can 
I make manage_addCls accessible to the Zope Python script?

First I got an error that manage_addCls is unknown (no surprise).  So 
I tried to import Prod and refer to Prod.Cls.manage_addCls.  Now I've 
got an ImportError saying that 'import of "Prod" is unauthorized.

Is this a simple permissions issue?  What permissions would I have to 
change to be able to run my Python script?

The script is not supposed to be accessible to users -- it's just 
something I'm running to populate my site with initial folders and 
instances of my product's classes.
-- 

     --- Mitchell