[Zope] External Methods ->syntax + file access = how ?

Rik Hoekstra hoekstra@fsw.leidenuniv.nl
Fri, 29 Oct 1999 14:50:25 +0100


(also see Phil Harris' post)
<snip>

> 
> At present, all the PIL files are in the 'Extensions' folder, but I
> understand from the ZCMG that I could also put them in 'Shared'. The ZCMG
> says that I can create a folder in 'Shared' with company or personal name
> and then this will be automatically referenced by zope. What is not clear
> to me what name, why and what do I ave to do to tell zope about the folder
> name I have created there.?

The Extension folder is meant for external methods, which can do all 
sorts of python things and call any conceivable python package. 
However, for security reasons external methods are not treated as 
modules in the python sense. I even believe it is not legal to place 
your extension python code inside the Extension directory.
In other words "PIL" should be somewhere outside your Extensions 
directory. A good place to put packages is in a subdirectory of the 
lib/python/Shared directory. Don't forget to include a __init__.py 
(may even be empty) in each of the subdirectories (see regular python 
documentation on www.python.org for this).

Moreover, PIL has a nameclash problem with Zope and should be made in 
to a package (the Poll product suggests to put this in sitehome, but 
I did not get this to work. It worked in the Shared directory, 
though).

<snip>

good luck

Rik