[wingide-users] python path doesn't seem to work as expected
Wing IDE Support
support at wingware.com
Fri Oct 29 11:21:57 EDT 2004
Danny Bloemendaal wrote:
> In 1.x I set the python path in my project properties like this:
> and that worked well. But in 2.0 this doesn't seem to work for stuff in
> from Products.Archetypes.utils import DisplayList
> then it says that it can't find definition of 'DisplayList'
This is because Archetypes is supposed to be in a package named Products
and not directly in the Python path. With the above setting in the
project properties, Wing should find the definition of DisplayList if
'from Archetypes.utils import DisplayList', but that might not work at
Part of the issue here is that Zope plays tricks (for good reasons) to
get files that appear in both Products directories to be in one Python
package. In unmodified Python, the first directory on sys.path that
contains an __init__.py directory is the package directory and only
modules in that directory are in the path. Wing uses this definition of
sys.path when it analyzes source code. We plan on adding support for
the Zope instance directories in the future.
I don't know why this seemed to work in Wing 1.1.
More information about the wingide-users