Choosing a Python IDE, Part Two: Komodo IDE

filed under python-ide

This week I'm continuing my series on IDEs for Python. This week, I've been looking at Komodo IDE, an IDE by ActiveState.

Komodo IDE

So, most important to some people I suppose, Komodo is not free. It costs 382 dollars for the professional version. You can opt for the free version, called Komodo Edit - I went with the 21 day trial of Komodo IDE. Komodo is a project based IDE - that is, you create projects. Projects build, run, etc. If you want to open all code in a folder, you create a project for it.

Introspective Code Completion

Huzzah! Introspection based code completion is one of the features that Komodo has, and they do it well. Not only are global, system level packages indexed, but packages local to the project are included as well - so you can develop on systems where you don't necessarily have the packages installed, i.e. what your development machine should be. The documentation associated with the modules/classes/functions are displayed as you type them, so looking up the documentation doesn't need to get done as much. For things where introspection doesn't make sense, i.e. snippet completion, Komodo has this as well.

It's not all smiles though - Komodo comes packaged with its own internal version of Python, for some reason. So there are certain things that it will fail on for the introspection due to invalid syntax - the version I downloaded came packaged with Python 2.6, meaning that things like multiple contexts in a single with statement, or dictionary comprehensions prevent the file from being introspected properly. That being the only problem though, introspective code completion is a pretty awesome feature when you need it.

This leads onto another nice feature - code browsing. Komodo provides your entire code-base as a browsable tree. This means you can see all your imports, global variables, functions, classes; everything. There's similar functionality for HTML pages - you can browse the DOM in a similar fashion.

Version Control Integration

I missed this feature from NetBeans - every time I modify a file, the icon for that file in the project tree changes, to represent that it hasn't been committed yet. The closest I have in a terminal is hg prompt, which for the most part is still pretty good to me.

It's a pity that directories don't indicate that files contained within them have been modified, however - it means you can't look at the fully closed, compact project and know for certain if you have modified files. There's a project level diff, but it's hard to find - the documentation references a menu option known as "Source Code Control on Contents" which doesn't exist anywhere. Instead, you right click on the project pane, without selecting any files. The first time, the Source Code Control sub-menu won't have any options enabled - repeat this action though and you'll be able to view a project level diff. That's pretty buggy behaviour, but hey, it works.


As I mentioned in part one, we have an in house tool for copying files to development machines. In Sublime, I could only get it to work on the current file, with the build system feature, which is great for the most part. But sometimes we want to copy not only the current file, but the current folder, or maybe even the entire project to a remote machine. In Komodo, I've remapped F9, F10 and F11 to copy the current file, current folder, and current project respectively - all completely painless once I figured out how to add them. To achieve this in Sublime, I would have had to write a plugin, or create three build systems. Achieving the same configuration for the current file and folder in Vim isn't too difficult, but current project is a different matter - there's no definition of "project" in Vim.

That said, remapping the the keys I did, did not update the menu items that originally used them. Every time I start up Komodo, I'm told that F9 will bring up the Invoke Tool dialog. I consider that a bug, and a confusing one at that.

Again, I activated Vim mode in Komodo - the extensions were not quite complete, but definitely more so that Sublime. Notably, I had more working visual modes, replace mode worked, and jumping to a specific line.

A small point, but I noticed that Komodo's extension system uses Mozilla's, with xpi files, so the interface is very familiar. I liked seeing this - it's better than rolling out Broken Platform number 50134.

Searchable UI

It's important to me that large IDEs can be searched. When you have a million menus, each with a million sub-menus, it becomes really time consuming to navigate them just to find the option you're after. It helps reduce the learning curve, and frustration, with trying to find a menu item. For the most part, Komodo has this covered - the settings dialog is massive, but it has a clear search field you can use. Even for remapping keyboard shortcuts, you could search the shortcuts to see what key you're using for something, or search for an action by name/description.

However, you can't search the regular menus. This was really frustrating for me. As I mentioned earlier, I added my regular shortcuts for copying files to remote machines As I mentioned earlier, I added my regular shortcuts for copying files to remote machines. When I did this, I checked "Add to Toolbox", hoping that would mean I don't have to type the command in anymore. This was true, but it took me an embarrassingly long time to find out where I could access this "Toolbox". Turns out it was under the View menu (Tabs & Toolbars > Toolbox), and also under the Tools Menu (Invoke Tool). If I could search the menus, I would have found out a lot sooner, and my workflow wouldn't have been completely broken.

Lastly, my favourite part of the searchable interface: Fast Open. Ctrl+Shift+O brings up a search dialog for opening any file in your project. No more clicking through tree nodes, no more directory crawling in a terminal. If I had a similar feature like this in Vim, I'd be very happy. In fact, I'm searching for a similar plugin to replicate it now.

File Editing/Viewing

First and foremost: Ctrl-Tab. I faced the same weird behaviour here as I did in Sublime Text 2. In fact, this was how I actually found out it was a feature in both IDEs - the idea is that you have a stack of tabs, ordered by when they were last viewed. I think it's wacky default behaviour, but there must have been a need for it somewhere.

Indentation is all over the place in this editor. I use Python, so 4 spaces is a standard thing to do. Komodo's default is 8 - it's 2012! Come on! Even after changing it, Komodo didn't care. For random files, the spaces were set back to 8 spaces. In one instance, a file I was editting was deemed to be 3 spaces, and no amount of monkey work could fix that. I was forced to close Komodo on more than one occassion and go back to Vim, simply because I couldn't get it to obey it's own whitespace rules. There's some mention on the ActiveState forums that there are global, project and file level settings for indentation, among other things. I looked everywhere, and I couldn't find indentation settings at any level except global.

Viewing files in Komodo is painful for me. I have a 15 inch laptop, and I can view 50 lines of code at once with no trouble - split screen gives me two 80-width views, so I'm not exactly strapped for space. Komodo however, due to the weight of the editor, allows me to view 25 lines of code at once. I tried split view, and it was terrible for me to read. That's more of an issue about screen size, I suppose, but I couldn't use it on a 24 inch monitor at work without feeling the same way, so I don't know. The general size of the IDE means I can't have multiple windows on the same screen without it getting squished, but the single window feels like a waste of space.


There's a feature in Komodo called Collaboration - the idea is that you share the codebase with multiple people at the same time. Kind of like version control, except everyone is working on the master copy, on the same machine, at the same time. I can't see any world in which that would be useful. I imagine that creates more havoc than anything - if anyone can think of a valid use case where this would be beneficial, let me know.

The default cursor speed, is set to ridiculously high. When you're typing, it completely disappears. When you're moving it around, it disappears. There's a fix on the ActiveState website from 2007, using a Javascript macro, but come on? It was lodged as a feature request back then too. It's weird that this hasn't been fixed.


So basically, where does this leave me with Komodo? It's great, but not that great. I could keep using it, but to be honest, I just don't grok with the editor. The editing pane is tiny, like I'm staring down a dark hole to read code. The overflowing expanse of features meant I was sure to have everything I needed, but it took me forever to find it.

That said, the searchability of the UI, including Fast Open, was generally pretty good. The introspective code completion was pretty awesome. I think if you want a full featured editor that will offer (nearly) everything you want, Komodo would be a good fit. If you want to look at a lot of lines at once, then you're better off looking else where.

Related Posts