Zope query: importing packages from External Methods
Whitney Williams
whitney at pk3i.com
Tue Apr 2 02:46:17 EST 2002
I have created a package and placed it into a directory which I
believe should be visible to Zope and/or it's associated python
installation.
However, the normal package import semantics don't seem to be
available -- i.e., the sub-modules are not added as attributes to the
root module, although I have placed __init__ files in the relevant
directories (and precompiled the modules with mixed results).
I have confirmed this package does work as expected if invoked via an
external python interpreter.
I have tried ZOPE\lib\python\Shared, PYTHON\site-packages, and even
ZOPE\Extensions.
=> I don't want to litter my Extensions directory with 50 separate
module files
=> I want to enforce a hierarchy on the module usage
=> Since I want to reuse the package(s) from outside code, I would
prefer not to use a Zope-specific mechanism (i.e., a Product).
I am certain I am overlooking the obvious, but I can't find anything
in the documentation.
PS: In the course of experimentation, I have noticed that
ZOPE\lib\python\Shared\DC behaves as desired -- but I cannot replicate
this behavior in my own packages placed here (I have even tried 'cp
-Rap DC/ DCK/', preserving attributes, but the clone directory does
not behave as expected?!).
What am I missing?
Any ideas would be appreciated.
More information about the Python-list
mailing list