tags:

views:

259

answers:

5

After using C# for long time I finally decided to switch to Python. The question I am facing for the moment has to do about auto-complete. I guess I am spoiled by C# and especially from resharper and I was expecting something similar to exist for Python.

My editor of choice is emacs and after doing some research I found autocomplete.pl, yasnippet and rope although it is not clear to me if and how they can be installed in a cygwin based system which is what I use since all the related documentation appears to be linux specific...

The version of emacs I currently use is 23.2.1 which bundles the python mode that although useful is far behind from whatever research has to offer.

My question to python users has to do about how common is autocomplete vs manual typing (using M-/ where possible) ?

I am thinking about just memorizing python build-in funtions like len, append, extend etc and revert close to a pre-automplete editing mode. How different such an approach is from what other pythonistas are doing?

+3  A: 

I'm spoiled by Intellisense too. The PyDev extensions for Eclipse offer a pretty good auto-complete substitute.

HugeIsALegoManiac
I am aware about PyDev... I would prefer staying with emacs if possible but I will try PyDev and see if it is suiting my coding habits
JohnP
A: 

I find that PyDev + Eclipse can meet most of my needs. There is also PyCharm from the Intellij team. PyCharm has the added advantage of smooth integration with git.

Manoj Govindan
Care to explain the down vote?
Manoj Govindan
+4  A: 

I found this post

My Emacs Python environment

to be the most useful and comprehensive list of instructions and references on how to setup a decent Python development environment in Emacs regardless of OS platform. It is still a bit of work to setup but at least it covers the popular packages and components generally recommended for Python in Emacs that provide auto-completion functionality.

I loosely used this post as a guide to do the setup on my Windows machine with Emacs 23.2.1 and Python 2.6.5. Although, I also have Cygwin installed in some cases instead of running the *nix shell commands mentioned in the post, I just download the packages via a web browser, unzip them with 7zip, and copy them to my Emacs' plugin directory.

Also, to install Pymacs, Rope, and Ropemacs, I used Python's EasyInstall package manager. To use it, I downloaded and installed the setuptools package using the Windows install version. Once installed, at the command line, cd to their respective download locations and run the command

easy_install .

instead of the shell commands shown in the post.

Generally, I saved any *.el files in my ~\.emacs.d\plugins (e.g. in %USERPROFILE%\Application Data\.emacs.d\) and then updated my .emacs file to reference them as documented in the post.

Despite all this, on occasion, I've used DreamPie since it does have overall better auto-completion out of the box than my Emacs setup.

Ray Vega
A: 

I've been using PyScripter, an IDE for Windows, for a while now, and have found it very good. It has autocompletion among many other features. It's written in Delphi -- not that there's anything wrong with that -- it just bothers me a bit, though...

martineau
A: 

Take a look at Spyderlib, support most of the features including code completion

svvn