Hello, I've been doing alot with Zope over the last few months and I just decided to get a bit deeper into it. My problem is that I'm trying to acces one object from inside a little python project. Is that possible? I mean: If I got a folder and I want do call the addImage method from a Python-class how do I do it?
On Wednesday, July 24, 2002, at 07:56 AM, jochen wrote:
I've been doing alot with Zope over the last few months and I just decided to get a bit deeper into it. My problem is that I'm trying to acces one object from inside a little python project. Is that possible? I mean: If I got a folder and I want do call the addImage method from a Python-class how do I do it?
context.addImage(params) ___/ / __/ / ____/ Ed Leafe http://leafe.com/ http://foxcentral.net
context.addImage(params)
Sorry, seems like the description of my problem wasn't as clear as I thought ;-) The above solution works for a PythonScript Object inside Zope. What I was looking for was to do the same thing from inside a PythonProduct. After looking into the ZopeSources I found what I was looking for. To acces objects in the context from inside a PythonProduct class do the following: from Shared.DC.Scripts.Script import BindingsUI class <classname>(BindingsUI): def <somemethod>(self): context=self.getBindingAssignments().getAssignedName('name_context',None) Anyway, thanks for the fast response.
participants (2)
-
Ed Leafe -
jochen