Filed Under (Editors, Python) by Marcin Kuźmiński on June-20-2009

I went through many of python editors, and always came back to PyDev. Pydev in an plug-in to eclipse it comes with load of features, among them:

  • Package Explorer showing outline for python modules
  • Mylyn integration (separate feature: org.python.pydev.mylyn.feature)
  • Jython and Python support!
  • Support for scripting Pydev with Jython
  • Nice PYTHONPATH configuration!
  • Project and module creation wizards
  • Ctrl+Shift+O: Organizes imports or sorts selection alphabetically
  • Ctrl+Shift+F: Autoformat your code (preferences can be set)
  • Python 2.4, 2.5, 2.6, 3.0 syntax supported
  • Pydev builders can be disabled
  • Syntax highlighting
  • Spell checking (depends on JDT for Eclipse 3.3)
  • Hovering in errors shows descriptions
  • Matching brackets highlighted.
  • Parser errors marked in the task list
  • Outline view with imports/functions/classes
  • Tabs or spaces preference
  • Smart indentation (indent and dedent)
  • Navigation: keyboard shortcuts to previous or next function. Default: (Ctrl+Shift+Up and Ctrl+Shift+Down)
  • Comment and uncomment commands (on the popup menu) and keybindings. Default: (Ctrl+3 and Ctrl+Shift+3)
  • hyperlinks over functions//import statements
  • Code folding
  • Refactoring with bicycle repair man.
  • Code Completion (Ctrl+Space)
  • Templates Completion (Ctrl+Space Too)
  • Go to definition with F3 (powered by bicycle repair man)
  • Content Assistant (Ctrl+1)
  • Code Coverage
  • Pylint
  • TODO tasks
  • Background and current line color chooser.

I highly recommend using Pylint in pydev it really helps to keep the code good quality. Pylint analyzes your code and shows unnecessary variables and imports, provides helpers to clean up the code and many more.

To install pydev just add http://pydev.sourceforge.net/updates/ http://pydev.org/updates (see update below) link to eclipse by using software updates and addons option.
I’m using the nightly builds for eclipse (http://nightly.aptana.com/pydev/) because they always come with new features earlier than the main release but remember use it on your own responsibility. You can find how to setup pydev here. When your up and running with pydev download pylint from here don’t forget the necessary dependencies i.e: logilab-astng, logilab-common, links are on the pylint download site. The turn on pylint you have to add a path to lint.py file in pylint tab on pydev options in eclipse. After restart of eclipse you should see output from pylint on the eclipse console anytime when you save a python file.

Now enjoy the most powerful python IDE available :-)

UPDATE: since PyDev release 1.5 now the package have integrated a pyDev extensions… the new repository for eclipse containing the version 1.5 is :http://pydev.org/updates
I also added a post about the PyDev extensions see it here http://www.python-blog.com/2009/09/06/pydev-extension-now-open-source/



Filed Under (Editors, Python) by Marcin Kuźmiński on June-20-2009

I was looking something to replace Gedit / Scite text editor, since  i work with large files (1+ mln lines) opening those files in gedit was a nightmare i took 5-8 minutes to open a file with almost 100% cpu load, and searching through the files was almost as slow as opening.

Before gedit i used scite the scintilla base text editor i was extremely fast it almost perfectly suited my needs except two things. Lack of other types of encoding than UTF-8 and in my opinion stupid options file that had to be edited manually since it doesn’t save options when you change it in scite. I looked for something to replace scite as well.

So i started looking for a scintilla based text editors, and i found one. Geany 0.17.

“Geany is a small and lightweight Integrated Development Environment. It was developed to provide a small and fast IDE, which has only a few dependencies from other packages. Another goal was to be as independent as possible from a special Desktop Environment like KDE or GNOME – Geany only requires the GTK2 runtime libraries.”

Some basic features of Geany:

  • Syntax highlighting
  • Code folding
  • Symbol name auto-completion
  • Construct completion/snippets
  • Auto-closing of XML and HTML tags
  • Call tips
  • Many supported filetypes including C, Java, PHP, HTML, Python, Perl, Pascal (full list)
  • Symbol lists
  • Code navigation
  • Build system to compile and execute your code
  • Simple project management
  • Plugin interface (see Plugins)
  • Built in console
  • Opens file in choosen encoding
  • Replaces EOF for WIN UNIX MAC formats

So now opening a file is taking 20 seconds :) It’s extremely fast, and have powerful search options. This is THE text editor I’ve been looking for…
A good replacement for gedit which is slow, and scite whitch is fast but week in configuration.
Highly recommended you can download a source /  win exe from this location download geany