On Fri, Feb 18, 2011 at 6:17 PM, Luke Crouch <luke.cro...@gmail.com> wrote:
> I have a pydev project named 'kuma' with a vendor/kuma.pth file like so:
>
> packages
> packages/pytz
> packages/coverage
> ...
> src
> src/django-cronjobs
> src/django-cache-machine
>
> I tried adding vendor/ to the project PYTHONPATH, but it doesn't add
> the directories from the .pth file? E.g.,
>
> from caching.base import cache
>
> gives 'Unresolved import: cache' even though
> src/django-cache-machine/caching/base.py defines it
>
> I've got 59 lib's in my kuma.pth file - I'd rather not have to add
> each of them to the PyDev - PYTHONPATH. So how can I add .pth files
> and/or their contents to PyDev - PYTHONPATH?

.pth files aren't really used (or interpreted) in pydev. If you have
defined them in the interpreter, when adding the interpreter, all
those paths should be presented, now, if you only want to add them to
a project, as there are really lots of files, a solution would be
editing the .pydevproject file directly (it's a raw xml file -- you
can add only one of those paths to see how it's added, open it in the
text editor and use the Eclipse rectangular edit (ctrl+shift+A) so
that you can just copy all those contents in a single step, or you
could create a script that gets the original file and creates the
.pydevproject accordingly -- which may be better if you're always
updating that file).

Cheers,

Fabio

------------------------------------------------------------------------------
The ultimate all-in-one performance toolkit: Intel(R) Parallel Studio XE:
Pinpoint memory and threading errors before they happen.
Find and fix more than 250 security defects in the development cycle.
Locate bottlenecks in serial and parallel code that limit performance.
http://p.sf.net/sfu/intel-dev2devfeb
_______________________________________________
Pydev-users mailing list
Pydev-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/pydev-users

Reply via email to