As you probably know, Zope 2 can have multiple directories containing
product modules, which are put inside the Products. namespace at
A way to make autocompletion work inside Zope 2 products is to put an
__init__.py file inside the instance Products directory; however,
this approach doesn't work in instances with multiple products
directories defined in zope.conf.
I gave a quick look at Pydev source code and found the
getModulesFoundStructure method, then I arbitrarily changed each top
module name by prefixing the string "Products." to it; now for every
top module in my test project, I get autocompletion working as I'd like.
Is there any evident side effect which could be caused by this kind
of module name mangling?
If not, I would like to implement a new list of source folders in the
project properties called "Zope2 products source folders" which
always get "Products." appended by the ModuleManager, in order to
ease developing on instances with multiple products directories.
From: Patrick Smith <paddysmith@gm...> - 2007-09-18 20:35:25
Not sure if that was necessary. I use mulitple locations for my
product code and specify them all in zope.conf:
# Plone Products.
# External Products.
# My Products.
I just make sure that:
 every Products directory above has an __init__.py and the products
I am interested in. For example, the external products structure would
Each of the AddRemoveWidget, Clouseau, FCKeditor directories would
include __init__.py files as well as the files checked out from the
 Each of the following would be included on the Python PATH:
NB: $DEV_HOME would be replaced by some path in all cases.
On 18/set/07, at 22:35, Patrick Smith wrote:
> Not sure if that was necessary. I use mulitple locations for my
> product code and specify them all in zope.conf:
> # Plone Products.
> products $DEV_HOME\plone\2.5.3\Products
> # External Products.
> products $DEV_HOME\external\Products
> # My Products.
> products $DEV_HOME\myproducts\Products
> I just make sure that:
>  every Products directory above has an __init__.py and the products
> I am interested in. For example, the external products structure would
Yes, this is doable with manually managed instances, but not
practical with environments
like buildout where product locations are organized automatically
(e.g. parts/Plone-2.5.3-final, parts/dependencies etc.).