tags:

views:

254

answers:

2

Hi Stackoverflowers,

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.

+1  A: 

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.

Mark
i'm checking my setup to verify your points. What i meant by garbage was that pydev autosuggest gave me a lot of results without any relation to the object i instantiated. Just like if it was giving me all methods from all classes it had in memory.
Well, i realized that all the classes i wrote were the reason of the msess since even the simple ones inherited from the object class. What's its purpose ?
+1  A: 

Pycharm (http://www.jetbrains.com/pycharm/index.html) is much metter than Pydev for auto completion, among other things.

jacob