[Pydev-users] [Users] Unresolved imports with jython in Eclipse
Brought to you by:
fabioz
|
From: SourceForge.net <no...@so...> - 2011-04-26 21:57:27
|
The following forum message was posted by bsnahrwold at http://sourceforge.net/projects/pydev/forums/forum/293649/topic/4505513: I see that many other posts have been made regarding unresolved imports. I have really tried to review the docs but am not getting anywhere trying to import between packages. I have the followings code structure: Project\src\TestPkg\TestMod.py (containing TestClass) Project\src\TestPkg\TestUnitTest.py TestUnitTest.py contains: from TestMod import TestClass No problems. It all works with Project properties: Jython, grammmar version 2.2, Interpreseter jython 2.2.1 (points to c:\jython2.2.1\jython.jar) PYTHONPATH contains: /Project/src/ /Project/test I have tried configuring c:\jython2.2.1\registry with: python.path = C:\\PathtoProject\Project\src;C:\\PathtoProject\Project\test If I create a second package in this same project Project\test\UnittestPkg\TestUnitTest.py I am unable to import from TestPkg: from TestPkg.TestMode import TestClass Code Assist does not see TestPakg, only UnittestPkg. I had created a number of applications that perform this type of importing between packages, but outside of Eclipse and the src folder requirement. If I don't develop with src forders, I have no code assist. If I develop in Eclipse with Source folders, (whether in native Eclipse or Apcelerator 3.0), I get unresolved imports and code assist sees nothing. Is there a tutorial somewhre that describes how to do these kinds of imports between packages using jython as the interpreter in Apcelerator 3.0? Or does anyone have a recommendation on how to successfully configure these types of packages? Thanks, Bryan Nahrwold |