[Zope] non-External Methods
Pavlos Christoforou
pavlos@gaaros.msrc.sunysb.edu
Thu, 11 Mar 1999 11:07:22 -0500 (EST)
On Thu, 11 Mar 1999, Oleg Broytmann wrote:
>
> What is "evaluated"? Compiled?
>
> > code that is stored in the Object Database. There was a thread about
> > whether the source code should be included in the Object Database but I
>
> I watched the thread and did understand the security implications.
>
Well this is how I understood the process.
Basically the code is read and exec-ed and the the func_code
func_code.co_varnames are extracted. Then they apply all the clever tricks
to turn the function into a valid Zope method, by (I assume) creating a
Zope method and replacing its func_code and the associated func_defaults
and arguments with the ones extracted from the external function.
The relevant code can be found in
Zope/lib/python/App/Extensions.py and
Zope/lib/python/Products/ExternalMethod/ExternalMethod.py
Pavlos