[Zope] Interfaces to imported python modules
Dieter Maurer
dieter@handshake.de
Wed, 23 Jul 2003 20:29:48 +0200
Matt wrote at 2003-7-23 18:32 +1200:
> ...
> I seem to be having a problem accessing attributes and methods of
> objects created inside a custom Zope product from python scripts and
> ZPTs.
Whenever you have authorization problems, Shane's "VerboseSecurity"
may help you.
> ...
> def createAndAddDataObject( self ):
> self.dataObjects.append( Data( ) )
>
> def getDataObjects( self ):
> """
> return the dara
> """
> return self.dataObjects
>
>
> Class Data:
>
> def __init__( self ):
> self.data = ObjectA()
> ...
> The problem is that I can call a method such as getDataObjects from a
> python script and get back a list of objects of type Data. However I
> cannot access the attributes or methods of the ".data" attributes of
> these Data objects.
Your "ObjectA" instances must have security declarations.
Unless they derive from "Acquisition.[Im|Ex]plicite",
they must be public.
The ZDG should provide the details.
Dieter