Scott Mann wrote at 2005-8-23 10:00 -0700:
> ...
>I am attempting to add the external python module "nb_fetch" Doing so returns 
>the error message:
>    "Module /data/zope/testbed/initialzope/Extensions/, line 3, in ?
>             ImportError: No module named nb_parse"
>where nb_parse is imported by nb_fetch.

Note that Zope does not use Python's normal import mechanism
to load the source file for "External Method"s.
One impact: you cannot use relative imports:

   Even if "" and "" lie side by side in
   the same folder, "" cannot simple do
   an "import nb_parse" to access the other module.

> ...
>I have also made a number of attempts at adding directories to the PYTHONPATH, 
>but no success.

If "" is in a folder listed in PYTHONPATH,
the "import nb_parse" should succeed.

> ...
>Also, I restart zope every time I make a change.

Change what?

If you change the source file of an "External Method" *AND*
you run your Zope in "development mode", then changes are
recognized automatically.

Chances in other Python modules (such as your "nb_parse" above)
require a Zope restart.

Zope maillist  -
**   No cross posts or HTML encoding!  **
(Related lists - )

Reply via email to