Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Bad auto completion with python on pydev?

Tags:

python

pydev

I began learning and loving python about a month ago. Dive into python, django and now Tornado is the path i followed during this time. I chose pydev as an IDE since it seems to be the most up to date and i wanted to come back to eclipse since i'm using Netbeans for php and Java.

My question is the following: When i write classes in php or java i declare my methods and properties. I instantiate them somewhere else and use them. The autocompletion works great for java and php but with python, it seems to be always suggesting me a bunch of garbage and never the real object's methods from the class i instantiated.

Is it the same for you ? Is it a limitation from pydev ? Am i doing something wrong ?

Thank you in advance for pointing me in a direction. Matthieu.

like image 811
user296546 Avatar asked Nov 15 '22 11:11

user296546


1 Answers

First make sure your interpreter is set up correctly.

Window | Preferences | Pydev | Interpreter - Python

I use cpython on linux so my interpreter is

  cpython      /usr/bin/python25

Under Libraries, make sure all the standard PYTHONPATH stuff is in there:

System Libs
  /usr/lib/python2.5
  /usr/lib/python2.5/site-packages
  /usr/lib/python2.5/wx-2.8-gtk2-unicode
  /usr/lib/python2.5/lib-tk
  /usr/lib/python25.zip
  etc....

You can also add any non standard paths here by clicking New Folder.

Do not add paths to your own source code though. These should come in when you configure a pydev projec, select a "src" folder and start making modules, see here.

like image 133
Mark Avatar answered Dec 18 '22 09:12

Mark