[Zope] call an object from within a product

Benjamin Buffereau benjamin.buffereau@enst-bretagne.fr
Tue, 29 Jan 2002 13:40:07 +0100


Thank you Dieter,

I had a look at your Dispatcher product, but I obviously lack knowledge of the
internal zope machinery to understand what you're exactly doing. I tried to
copy/paste your "mapply infrastructure" in an External Method, but I get a
SystemError: "Failed to import class _missing_name from module __main__".

I didn't think that just get the value of an object would be such a mess. I
think I'll try this ugly solution: 

object_value = urllib.urlopen("localhost:8080"+object_path).read()

Benjamin.


Dieter Maurer wrote:
> 
> Your question in not stupid at all and it is not at all simple.
> In fact, it is impossible:
> 
>   ZPublisher and "dtml-var" call objects in very different ways
>   (although you may not always see the differences).
> 
> You may have a look at my "Dispatcher" product at
> 
>   <http://www.dieter.handshake.de/pyprojects/zope>
> 
> It tries to do something similar than you want.
> Due to the problems mentioned, it is not perfect and I am not
> completely satisfied with it.
> 
> Dieter