I’m running PyDev 2.2.3 on Aptana 3.0
The following example project resembles my current working project:
\project-dir
\lib
\main
In lib I have reader.py containing a base class Reader(object), and rssreader.py containing RSSReader(Reader).
I’d expect PyDev, when running the Fix/Order Imports to add a line to rssreader.py saying
from reader import Reader
instead it’s autogenerating
from lib.reader import Reader
Any ideas?
It is related on how is configured your PYTHONPATH in your Pydev project.
If looks like your PYTHONPATH contains only project-dir so Pydev autoimport in an absolute way, so it makes
from lib.reader import Reader.If you want to have
from reader import Reader, you’ll have to put in your PYTHONPATH the project-dir/lib directory (in preference before the project-dir/ directory).