python - Import Error - Pydev Eclipse -
I have written an existing code from an SVN repo which uses full import - by which I mean:
-> ProjectDeir
--------> Dira
--------------> a1.py
--------------> a2.py
--------> dirb
- -----------> b1.py
Suppose a1.py imports a method from a2.py:
generally But I will just write:
A2 import from xyz
Here he has written it:
Project_dir.dira.a2 import xyz
from Iklipas How do Badlu again these imports?
Actually I want to be able to open Ctrl + click and Open Declaration. I need to browse through this huge project and I can not do this as long as it works.
PS:
- I have tried to add a projector to PythonPath
- I have tried to add each and every sub-directory to the PythonPath.
- I have an init in each folder -_-
To work, you must have init .py under 'Project_Dir', 'Dira' and 'DiBb' and then set you as a source folder that is 'project_dir' (and itself project_dir No L is - and should also be set as a directory source folder.
Ie: The source folder is the directory added to the PithanPat (hence, to import 'project_dir', its parent should be in Pithipet).
Note: You may have to remove the project from Eclipse / PEDWOW to work on the basis of how it was created for the first time.
Comments
Post a Comment