Don't understand german? Read or subscribe to my english-only feed.

Python on the console

I wrote a small python webpage for the grml-wiki to provide some information regarding Python-development on grml. I just upgraded Vim on my main system to version 7.1 and omnicompletion with vim-python became better once more. So time for a short demo of ctrl-x-o:

Python coding in Vim 7.1 - Screenshot

I also very much like ‘%ed’ within ipython using the following snippet in my ~/.ipython/ipythonrc:

editor 1
editor /usr/bin/vim.python

Notice: Don’t wonder about the prompt style of the following ipython-screenshot, I customized it a little bit (see python-webpage in the grml-wiki again to get an idea).

ipython demo - Screenshot

So running the last line containing ‘%ed 1’ will execute /usr/bin/vim.python providing the code from the first command line of ipython and I can use all the magic of Vim for editing the code. When exiting the editor I have the code within ipython. Rocking. :) Oh, don’t forget to check out the Quick tips of ipython when exploring it. Now what’s missing in ipython is the edit-command-line feature of Zsh. That would allow me to edit already typed (but not yet executed) code with an external editor. Anyone out there with an according tip? ;-)

Comments are closed.