Read and respond to this message at: 
https://sourceforge.net/forum/message.php?msg_id=4109637
By: jreitsma

Hi,

I don't have import errors, but the code completion did not work at first, due
to a peculiarity of Zope: All products are added to the 'Products' packet 
namespace,
so you cannot simply add a product to the PYTHONPATH. To cite the zope.conf
file (products directive):

"Each directory identified will be added to the __path__ of the Products 
package.
All Products are     initialized in ascending alphabetical order by product
name.  If two products with the same name exist  in two Products directories,
the order in which the packages appear here defines the load order.  The master
Products directory exists in Zope's software home, and cannot be removed from
the products path (and should not be added to it here)."

One workaround for Pydev is to add a Products folder that contains the actual
products, the Products folder does not need to contain an __init__.py to be
recognized as a Python package by Pydev. The parent of the Products folder must
be added to the PYTHONPATH. Note: You need to clean (and rebuild) the project
to get the code completion to work.

A better solution would be the ability to add a package prefix to each python
path source folder. For Zope/Plone products the prefix would then be 'Products'.
Is that possible Fabio?

Kind regards,

Jaap

______________________________________________________________________
You are receiving this email because you elected to monitor this forum.
To stop monitoring this forum, login to SourceForge.net and visit: 
https://sourceforge.net/forum/unmonitor.php?forum_id=293649

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Pydev-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/pydev-users

Reply via email to