eval.vim: eval sel or file in external interpreter.

This is a generic solution to evaluate the current line, selection, region,
file, etc. in an external interpreter. filetypes must define b:evalfile and
optionally b:evalsel. For example, in the case of ipython:

let b:evalfile = "%run {FILE}"
let b:evalsel = "%paste"

Oneliners will be directly copy&pasted. The current file will always use
b:evalfile. Finally, selections with more than one line will use b:evalsel if
available or fallback to b:evalfile otherwise. In this last case vim will copy
the selection to a temporary file.
ipython: use tk matplotlib backend.

python3, pygobject, matplotlib, ipython: currently this is a mess:

1) There is no pygtk for python3, the modern replacement is pygobject.

2) ipython 1.1 (stable) doesn't support --pylab==gtk3 (pygobject). ipython 2
   (dev) does support it but defaults to the matplotlib Gtk3Agg backend, not the
   Gtk3Cairo backend.
   https://github.com/ipython/ipython/pull/4640

3) matplotlib Gtk3Agg backend is broken in python3.
   https://github.com/matplotlib/matplotlib/pull/1227.

So these are some possible solutions:

a) Install ipython-git and set the Gtk3Cairo backend in matplotlibrc. Then set
   pylab=auto instead of pylab=gtk3, so that Gtk3Cairo is chosen instead of
   Gtk3Agg. This is overkilling: unstable package, config tweaks.

b) Just use another, non-gtk, backend: tk and qt work fine.