[Zope-DB] import modules for external methods
dieter at handshake.de
Thu Oct 9 15:31:45 EDT 2003
Martin Krallinger wrote at 2003-10-9 11:45 +0200:
> While I tried to add an external method I got
> an error message stating that I could not import
> a given modules located in my python site-packages.
That is strange. Usually, Python adds "site-packages" to
its "sys.path" automatically.
You can check "sys.path" in "Control_Panel --> Debug Information".
> To "show" the external method were this module
> is located I use the sys.path.append
> import string, os, sys
> from my_module import yx
> The curious thing about this all is that I could in the
> beginning add this external method, and it worked fine,
> but after restarting my Zope I did not work any more, without having
> done any changes in the external method !
This is strange indeed...
Especially, because changing "sys.path" should not be necessary
in the first place (it's a bad thing to do in an External Method
> My questions would be:
> 1)Are there any dependencies of the external methods and restarting the
> 2) If yes what kind of dependecy and how should I proceed?
> 3) Are there
> some "usefull" documentations on importing modules from e.g.
> site-packages for external methods?
They should just work...
Therefore, there is nothing special documented.
More information about the Zope-DB