October 10, 2009

My experiences with Eric, a Python IDE

I used the Eric Python IDE for a recent project and would like to share my thoughts. I have been programming in Python for a while now and have been testing various IDE's/Debuggers. These include

I did know about Eric for a long time but never really used it before. The first time I tried it (KDE 3, Qt3 days I guess), I found the interface extremely hard to use and so never thought of using it for a long time.

When I started my current project, I was having a tough time with the other IDE's - crashes, problems with indentation etc., Hence, I decided to give Eric a try. After some initial configuration, I was coding right away. At the end of the project, I was finding myself very productive and focusing more on writing code than fixing problems with the IDE.

One reason I did not try Eric before was the thought that it would not have the much needed 'Debug probe' support. This feature is available in Wing IDE and is used to check the values of local/global variables during the Debug process. I was wrong about Eric! The Shell (available in the Horizontal toolbox) provides this function during debugging. You can just type in variables, evaluate expressions right here and there is also the much-needed code-completion. Maybe this feature was there before. I just didn't know.

Some amount of configuration is recommended before use. Here is how I did it.


Interface cleanup

When the program is first launched, the main window looks something like this(Figure [*])


Figure: The main program window

Image main-window-default

As mentioned before, there are a number of toolbars enabled by default. As for me, I wouldn't be using all of them at present. Fortunately, Eric is highly configurable. A right-click on the toolbar brings up a popup menu from which toolbars can be enabled or disabled anytime(Figure [*])


Figure: Configure toolbars

Image toolbar-configure

I left the File, Edit, Start and Debug toolbars enabled and unchecked the rest. The result is this (Figure [*])


Figure: After disabling unused toolbars

Image toolbar-configure-first

The close, exit and clear buttons on the toolbar appear as buttons with similar functionality and I tend to be confused at times. Besides, I prefer to use File--> Close or File --> Exit instead of clicking on toolbar icons. Toolbar icons can be configured from Settings->Toolbars(Figure [*])


Figure: Additional toolbar configuration

Image settings-toolbars

I disabled all icons that I felt won't be using. This is how it looks now(Figure [*])


Figure: The toolbar after removing additional icons

Image toolbars-fixed


View Profiles

The project viewer on the left might be useful for projects with a number of files. In my case, I didn't need it right now. This is were perspectives come into picture. There are two perspectives available - Edit profile and Debug profile. What is visible in either profile is configured using View->Profiles (Figure [*])

I unchecked Vertical toolbox under Edit Profile and left the Debug profile as it is.


Figure: Configuring view profiles

Image view-profiles


The end result


Figure: The end result

Image edit-code



That's basically it. I would recommend adjusting some configuration parameters under Settings--> Preferences

  • Application
    • Show Splash Screen at startup (scary!)
  • Autocompletion
    • Autocompletion Enabled
    • Eric
      • Enable autocompletion
  • Style
    • Fonts - 'Use monospaced as default'
    • Margins
      • Folding style - Boxed Tree
    • Various
      • Show Whitespace
      • Show minimal context menu
    • End of Line
      • Edge Mode - Draw Line
Figure: After adjusting the settings

Image debug-probe


Features I liked in the IDE

  • Never had problems with Indentation
  • Code assistance - clicking on a variable, method, string etc., higlights other occurences in the script
  • Code completion
  • Code cleanup - PyLint
  • Quicksearch
  • Regexp wizard


Features I haven't tested yet

  • Refractoring
  • PyQt/Qt designer integration



The only feature I wished the IDE had is support for http://git-scm.com/Git. It has support for CVS and SVN.


To conclude..

Eric is a wonderful and powerful Python IDE. But, the default configuration would be intimidating for new programmers or those looking for alternative Python IDE's. The configuration suggested above is what I felt comfortable with. Others might have different views. But, as I said before, the IDE is fully configurable and one can choose what to use and what not.


Happy coding!

Click Here!