Wednesday, December 26, 2012

State of Python IDEs 2012

The search for a Python IDEs is like for lack of a better analogy like masturbating. Every serious programmer or serious programmer wannabe, more so the novice programmers have done it before or at least thought about it once or twice before. I know it's a bad analogy but you should know what I am trying to get at. We have all done it before one time or another or at least thought hard if there is something outside there better.

The macho among us will claim that we only use the true and tried Vim / Emacs but given an IDE that can do all that both of those can do and more would you not be tempted ? Some would argue that it's not about the tool and we if we put the time into it we can customize something usable out of the free stuff that is available out there. I for one would rather just pay for something like or just have everything available out of the box that is configurable without much effort and I am just a sucker for how good a great editor feels like when you are using it. At a certain point I can almost see the wisdom behind why people would rather just survive without plugins on a vim install ... but use vim without my NerdTree ?! Woe! What kind of life would that be.

Well my search went into serious mode for these past 2 weeks. I walk away from the experience a much frustrated but wiser man. Summary of my findings, which is quite shocking .... none of them are quite ready yet! I thought that this would be the state of Python IDEs say 2 to 3 years ago but it seems that the scenario has not changed much. Here are the few that I looked at:

1. Geany
2. Kate
3. Gedit
4. Spyder
5. Ninja-IDE
6. Anjuta with PyDev
7. Vim

2 and 3 are there because they are so ubiquitous with Linux distributions and I wanted to try them out to see if I can have an editor that comes with almost all Linux installations that I have not spent too much time with them and have something up and running in no time. Alas, finding that pep8 and pyflakes seemed more like a third party integration does not spark the hot fuzziness in me. that I can have out of the box without installing much of anything and just use them. Yes, I did look around and stuff like this for Kate, just did not work correctly either and even vim integration with Gedit looked aged and at last just did not work (Just spent another 30 mins with it to find the location of the plugins folder moving from gnome2 to gnome3 .. yeucchh).

Let's get to the so-called review part of this post. Let's start with the grand daddy of them all:

Vim

I have been using Vim for the longest time and to a certain degree it was great plugging in to my local pyflakes and pep8 to help with my Python code and the reason my love started to wander was because of the way plugins are managed. I used pathogen to manage my plugins and for sometime I was happy until strange errors started popping out here and there because some plugins were having errors. I found it quite hard to debug and found myself sitting at my terminal late one day deleting my plugins one by one until I finally arrived at the plugin that was causing the error. I patched it up and sent the author the patch, yet the whole experience created the seed of thought in my head that there must be a better way of doing things or at least a better editor / IDE out there that can be used.

Truth be told vundle seems promising and after knocking it around a bit it seems like a good way to manage your vim plugins across machines. Read this ... http://www.charlietanksley.net/philtex/sane-vim-plugin-management/

Sublime Text 2

This is the editor that I am still using today. While initially put off by it's text based config / settings files I stuck with it and was happy as it was light and responsive and it had everything that I needed, except maybe a debugger or a prompt that came out of the box. I was so happy with it I bought it and till today it remains my main workhorse. About 3 weeks back something happen though that diminished my love for sublime. I installed a new sublime editor in another machine and pointed it's plugins at my Dropbox install. This way all of my favorite plugins will always be available to me. It was strange, it just hung there refusing to start up. When I deleted the symlink to my Dropbox it just started up normally. There was no error messages, no logs nothing indicating what was wrong. I was quite devastated as like many I hated to have to go and look for another IDE / Editor that I can use but I was really up my creek without a paddle, as googling for the phrase "Sublime can't start because of plugin problems" yielded nothing useful. The other thing that irked my was the fact that I had to lug my plugins around all around in my Dropbox folder. The issue that I had with Vim was not really solved, infact it became worse, because with vim at least it could start up, it just spat some angry error messages at me.

Actually it would be unfair of me to comment on Anjuta with PyDev, Spyder or Ninja-IDE as all of the these IDEs just could not install correctly on my box. Anjuta was just dogged slowed my machine down to a crawl that even firing up a browser to go and look at what was wrong was rendered impossible. Geany I just installed today, but once I found that vim bindings was a wishlist item rather than a configurable item, that really put me off. At this point I am really wondering if PyCharm or WingIDE would be worth the investment. I tried ver 1.0 of PyCharm before and my initial view of it was quite laggy and consumed resources on my machine. Probably would be good for me to try out the 30 day trials of Wing and PyCharm as they can be quite pricey... 99USD for Pycharm and 245USD for WingIDE.

What seems to be going for PyCharm now as I look at it are:

1. Guido seems to be behind it.
2. Some obscure functionality which I usually use which I find hard to find anywhere else like the ability to stash away changes. This is something that is very useful for me which I only find that I could do using git. This is really one of the most attractive points for me to consider getting a license from these guys as it allows me to do this outside of whatever VCS that I am using and I do not need to do it two times.
3. Integrated nosetests and coverage.
4. Integrated pep8/flakes checking for code. Been using these for sometime now and I find them indispensable.

Down side seems to be:

1. Based on Java, read dead slow plus resource hog. Related to this I found this ticket today which looks a bit worrying.

Actually in summary, I can see very little wrong with PyCharm except that it becoming a resource hog which usually is the case for IDEs written in Java, just look at Eclipse. Enabling and configuring PyCharm to get semblance of a working environment for myself was quite easy and the controls seem intuitive without much need to hit google for an answer. Just as I wrote this my whole desktop became unresponsive because of the resource eaten up by PyCharm. The jury is still out on this one. I will post what I eventually do in part 2 of this.


17 comments:

Jeffrey04 said...

have you tried komodo edit?

Muhammad Hallaj Subery said...

Komodo has non-windows platforms? It looks yucky tho (at least, to my eyes)

Low Kian Seong said...

Yeah and Komodo-IDE is about usd 300+. Komodo-Edit is like Komodo-IDE except with all the good stuff taken out.

DhilipSiva Bijju said...

What about PyCharm? PyCharm looked OK.

Matt Williams said...

You should definitely check out KDevelop with its python plugin. I've found it to be, hands down, the best Python IDE in terms of code completion and intelligence about the code.

It should be available in all good Linux distros and is definitely worth checking out.

Jean-Louis Fuchs said...

For Vim python-mode, jedi-vim and taglist.vim are the Vim-IDE dreamteam.

PyCharm is great, if I wasn't for some strange reason happy with Vim, I'd go for PyCharm.

Greg Taylor said...

PyCharm has been awesome for me. Its code introspection is very good. It seems to really "understand" Python better than the others.

speaklikeaking said...

No love for Emacs?

Unknown said...

Netbeans also has Python support, it works OK, http://wiki.netbeans.org/Python

Mercurial also supports the same feature as git, it's called stashing in their language.
http://mercurial.selenic.com/wiki/ShelveExtension

Netbeans has some mercurial support also built in in with a plugin, but I can't comment on it, since I haven't used it. Command line does always more than GUIs

irmen said...

What kind of machine do you have? I've been using PyCharm for a while now and it has never locked up the system nor consumed "all resources". My computer is 4 years old and has a Core2Duo ~3Ghz and 4Gb RAM.

Note that older versions of PyCharm had a bug that could freeze the code inspector that runs when opening a project, but I've never seen that happen anymore since PyCharm 2.5 or so

Low Kian Seong said...

Irmen, believe me I would love it if PyCharm could work on my machine as well. My machine is similar to yours in terms of specs and I was running Chrome and a few terminals when the lock up started. I just started the evaluation copy of the latest PyCharm, left it sitting there and went for lunch then when I came back my laptop (Dell) was as sluggish as hell to the point I decided to restart it. Running Sabayon X.

Jean-Louis Fuchs said...

Probably its more Java VM version / settings thing. At least the last time I used Java on Linux I had to tweak (ie. -Xmx512m), its few years ago. On OS X PyCharm seems to run well.

t4ngent said...

Were you using PyCharm with official Sun JDK or openJDK?

OpenJDK has some performance problems with its garbage collection routines so PyCharm performs much better with Sun JDK especially if your machine has limited RAM.

If you are a vim user definitely check out the ideavim plugin for pycharm =)

lowks said...

t4ngent, sun jdk as I read that openjdk is not officially supported. My memory woes has been somewhat solved after adjusting my memory settings and I am beginning to suspect it's my chromium who is the culprit. PyCharm is not really as fast as Sublime but still acceptable.

אריאל בלומן said...

Visual studio with PTVS, the best thing i tried till now.
shame that i even had to go that far...

lowks said...

ריאל בלומן That screenshot looks fucking kickass! http://i.imgur.com/tyvjN.png. Too bad this thing lives on windows.

Stephan Deibel said...

Actually PyCharm is $199 commercial, $99 non-commercial and Wing IDE is $245 commercial and $95 non-commercial. There is also Wing IDE Personal for $45. If you're a professional programmer it is well worth paying for a Python IDE.