Monday, August 08, 2005

The Perfect Python IDE

There are a lot of things I look for in a good IDE. Looking for those things, I've tried Kate, KDevelop, Eric3, Komodo, and Boa-Constructor, to name only a few. Some of them give me a few things I like, each one giving different things. But, none of them have all of the core features I really want in a Python editor.
So, here I am laying them out. Maybe an IDE will be developed meeting these requests, or maybe I'll do it myself eventually, possibly joining one of the above mentioned projects.
Such an imaginary program we will call, for the time being, The Perfect Python IDE.
  • Indentation is important in Python programs. The fact that one can not mix tabs and spaces brings hardship to anyone who commonly edits multiple projects' files simultaneously, when they use different indenting rules. The Perfect Python IDE sees what kind of indenting is being used in the current file, and auto-indent following that style.
  • indentation exists both in the actual code and in how the code is displayed. Sometimes a line may be lengthy on a particular display, or when I'm using a horizontally split view. The Perfect Python IDE dynamically wraps the line's display without affecting the source code itself, and even indents the following line for clarity.
  • Of course, The Perfect Python IDE knows that if any feature gets in the way, its not a feature; it is a bug. That's why it only follows through with an auto-completion when I explicitly tell it to, and it always implicitly goes away the moment it sees I don't want auto-completion.
  • Even the smallest of projects needs a sense of history. You never know when you'll want to undo something you saved a week ago, so version control is a must. An IDE should naturally compliment such a system, like CVS or Subversion. The Perfect Python IDE only asks me for a path to the local working copy, or a svn+ssh:// URL to the repository, so it can just keep the working copy files hidden while I work on them.
  • As long as I'm just giving The Perfect Python IDE the URL to the repository, there isn't a need for any silly project files.
  • Now that my files are stored in a repository on a remote server, interested people might work on the code, too. They'll probably want the code to work when they update their working copies, so I'd better test before every time I commit something. The Perfect Python IDE can see my test/ directory and my test_*.py scripts and run them, being sure to set the PYTHONPATH for my package.
  • UnitTests being run is one thing, but doing something with them when the tests fail is something to be really proud of. The Perfect Python IDE extracts the tracebacks and bookmarks all the lines in the call stack. It even numbers them and displays local values at the time of error.
  • The Perfect Python IDE may be perfect, but part of that is being exactly what I want it to be, or what you want it to be. Those things may be different, but The Perfect Python IDE can be different, too. It can be customized at any point; and, it can be customized in Python. Of course, it is used as an editor of those very same customization scripts.
  • Not everything needs custom code to make it act right. The settings and configuration can go a long way, too. The Perfect Python IDE never asks me to restart it for settings to take affect, and it always lets me know exactly what any particular setting does.
Do I ask too much? I could probably ask for more. Did I not specify well enough what I want? I'm mostly listing it to get things straight in my own head. Does something already exist that does this all? I haven't it. Do Vim or (X)Emacs do the things I ask? They're ugly. I pay for high-end computers and large monitors for graphical interfaces, not consoles.
Yeah, they both have GUI modes, but they kind of suck. They're little more than terminal emulators enhanced for that particular program. Either of them could be a good GUI IDE, but communities around them just don't seem to understand the reason to make it looks "pretty", so I doubt they will, at least, not for a very long time. Despite what many techno-machos say, programs really are better when they're pretty.

1 comment:

Anonymous said...

Personally I'm a big fan of Komodo. I recently did a review of Python IDE's and that came out on top. Its also developing quite fast and hgas a massive support and community behind it.

If you were interested in seeing my review then visit my blog.