[Zope] External Method importing modules
Jonathan
dev101 at magma.ca
Tue Feb 13 08:17:03 EST 2007
----- Original Message -----
From: "Alan" <alanwilter at gmail.com>
To: "Andreas Jung" <lists at zopyx.com>
Cc: <zope at zope.org>
Sent: Tuesday, February 13, 2007 8:10 AM
Subject: Re: [Zope] External Method importing modules
> Thanks Andreas, I am trying with:
>
> 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?
You can easily check what's in your sys.path by having your external method
return it.
Typically, the Extensions directory (where your external methods live) are
not in the default path and need to be added to sys.path.(warning: be
careful on how you do this or everytime your external method gets called it
will add to the sys.path and will eventually cause you grief!).
Jonathan
More information about the Zope
mailing list