[Zope] external method import error (ImportError)...

Dieter Maurer dieter@handshake.de
Sat, 7 Oct 2000 13:45:16 +0200 (CEST)


Eric writes:
 > To summarize: How do I import modules in an External Method's .py file?
I remember, I read this in some "External Method" related documentation.

You do *NOT* place such modules inside the folder "Extensions"
but put them somewhere else reachable by "PYTHONPATH".

The documentation suggests that you create a subpackage inside
"Shared", say "<myCompany>Extensions", and place there
your module (don't forget "__init__.py" in the subfolder
representing the subpackage), say "<myModule>".

Then, in your external method, you would use:

	from Shared.<myCompany>Extensions import <myModule>


Dieter