[Zope] External Method importing modules
Dieter Maurer
dieter at handshake.de
Tue Feb 13 16:11:47 EST 2007
Alan wrote at 2007-2-13 13:10 +0000:
>if sys.path.count(myPath) == 0: sys.path.insert(0, myPath)
>
>where myPath should be '[Zope installation folder]/instance/import'.
>So my question now is: is there a variable inside Zope which can
>returns the 'import' path?
Formerly, the "ExternalMethod" documentation suggested to
put such modules into "<SOFTWARE_HOME>/Shared/<your_company>/...".
Nowadays (since Zope 2.7, I think), "<INSTANCE_HOME>/lib/python"
is a better place (with any structure you would like to use).
This folder is put on "PYTHONPATH" automatically. No need to fiddle
with it (I have already searched hours for problems caused by
runtime "sys.path" manipulations).
--
Dieter
More information about the Zope
mailing list