external Python methods
Hi I am trying to write an external Python method and Zope cannot find the python module that I want to import. How can I set the Zope Python path so that it can find any modules that I want to use? I am using a linix machine. -Ian p.s. Many thanks to those people who helped me with some fairly basic questions I had a few weeks ago. I have zope running now and it's amazing |Ian Mulvany ;0| www.mulvany.net|
ian@mulvany.net writes:
I am trying to write an external Python method and Zope cannot find the python module that I want to import.
How can I set the Zope Python path so that it can find any modules that I want to use? You do *not* put them in the "Extension" folders containing your external methods! You can put them anywhere where your Python path points too (import sys; print sys.path). "<zopedist>/lib/python" is, for example, in the path.
Somewhere in the External Method documentation, it is recommended to put application specific modules in a subpackage of "lib/python/Shared" (named after your company, to reduce the risk of name clashes). Dieter
participants (2)
-
Dieter Maurer -
ian@mulvany.net