[Zope] External Methods nightmare

Thomas B. Passin tpassin@mitretek.org
Mon, 9 Apr 2001 14:41:57 -0400


Felipe Alvarez Harnecker wrote -

> In folder FOLDER a got 3 method A (dtml) B (Zsql) and C ( external )
>
> the story is that method A call method B. From zope there is no
> prob. with that but when i call A from C, zope complains that it can't
> find B.
>
> I't seems that Zope forget that it is in FOLDER.
>

When you run an external method, you are basically escaping to an external
Python program, except that the results get returned to the calling method
in Zope.

The most reliable way to use an external method is not to try to call a Zope
method from the external method, but instead to pass in a Zope object or
value as a parameter to the external program.  When the external program
returns its results to Zope, let Zope call another Zope method on the
results.

Cheers,

Tom P