Is Python Intellisense Possible in Emacs?

2 min read · Posted on: Jun 14, 2005 · Print this page

Like the search for the Elixir of youth or philosopher’s stone, I was looking for some kind of Intellisense feature for Python in Emacs which I have grown used to since my windows programming days. Yes I’m referring to the little drop down list that helps you auto complete class members. I’m also referring the tool-tip that appears which shows a functions signature when you are calling it. I know that PythonWin, my python editor of choice, already does this. But I intend to use Emacs as my IDE. It seems that you have two alternatives, both have issues as you will see:

py-complete - Not yet Windows ready?

Firstly py-complete seems to require Pymacs. Now, this was not very obvious. The idea of python helping in completion seems to be very cool and nearly worked without pymacs. Seems pymacs is not quite well supported in Windows. As soon as I read this I sort of gave up.

Semantic Flopped

Then, I installed CEDET 1.0 (beta 3) which gives you Semantic inspired by this post. It seemed to be a pain to install the whole thing until I discovered that you have to keep certain things in the load-path. Finally this is what I added to my .emacs file

;; Set up load path
(setq load-path (append (list (concat use-home "site/cedet/speedbar")
(concat use-home "site/cedet/common")) load-path))
(load-file "~/site/cedet/common/cedet.el") ;; Load CEDET
(semantic-load-enable-minimum-features)

Now as the post suggests, we have a fully working speedbar but auto-completion is pretty much weird. For eg: M-x semantic-analyze-possible-completions describes the scopes you are currently in.

Conclusion

Both approaches are really good though quite different. They haven’t made use of the emacs tool-tip library either. Since this is a crucially lacking feature in Emacs, I might as well do a bit of R&D on this before giving up the dream.


Arun Ravindran profile pic

Arun Ravindran

Arun is the author of "Django Design Patterns and Best Practices". Works as a Product Manager at Google. Avid open source enthusiast. Keen on Python. Loves to help people learn technology. Find out more about Arun on the about page.

Don't miss any future posts!

Comments →

Next: ▶   My name is Ninjai

Prev: ◀   Birthday Bumps

Up: ▲   Blog

Featured Posts

Frequent Tags

banner ad for Django book

Comments

powered by Disqus