13 Feb
2007
13 Feb
'07
9:11 p.m.
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