s5s
s5s

Reputation: 12134

Free Python programming environement with autocompletion

I've looked at most of the IDE's out there. I've set up vim to use autocompletion and I'm using it right now. However, I can't seem to get it to work like Visual Studio with .NET. Autocompletion seems to work only in certain cases and it only shows methods and not what parameters they take. It's pretty much unusable to me.

What I'm after is a pop-up that will show me all methods available and the parameters they take. Pretty much the feel of VS2010 when you're programming .NET.

Upvotes: 1

Views: 485

Answers (3)

wim
wim

Reputation: 362647

Gedit has a developer plugin which tries to do some syntax completion. For reasons already mentioned, it doesn't work very well. I found it more annoying than helpful and disabled it after a few weeks trial.

ipython's new Qt console has tab completion and you can have some tooltip sort of popups with syntax help and docstrings. See screenshot below for example..

But as most people have already pointed out, this kind of thing you are asking for is really more appropriate for less dynamic languages.

enter image description here


enter image description here

Upvotes: 3

taleinat
taleinat

Reputation: 8701

I've been using Eclipse with the PyDev extension for some time now. The auto-completion there is really quite impressive, I highly recommend it.

Upvotes: 3

Larry Lustig
Larry Lustig

Reputation: 50970

You won't get the kind of autocompletion in a dynamic language like Python that you get in more explicitly typed languages. Consider:

 def MyFunction(MyArg):
      MyArg.

When you type the "." in MyArg., you expect the editor to provide a list of methods with arguments. That can't happen in Python because the editor has absolutely no way of knowing what type (or types) MyArg could possibly be. Even the Python compiler doesn't have that information when it's compiling the code. That's why, if you put MyArg.SomeNonExistentFunction() you won't get any kind of error message until runtime.

If you wrote something like:

 def MyFunction:
      MyObject = MyClass(SomeArg)
      MyObject.

then a smart enough editor can supply a list of methods available after that final ".".

You'll find that those editors that are supplying autocomplete "sometimes" are doing so in cases similar to my second example, and not doing so in cases similar to the first. With Python, that's as good as you can get.

Upvotes: 6

Related Questions