Very old versions of IPython do not have IPython.version_info attribute
that the ultls module relied on. This commit changes it to use the more
standard __version__ attriute that is present in all versions.
run_cell() becomes more complicated when we add ipython version 3
support which upsets pylint because there are "too many
branches (15/12)". Factor out part of the function to make pylint
happy.
The kernel may go idle before it processes the next input, which break
the while=True loop in run_cell() early. Wait for an acknowledgement
of the input we've sent to the kernel before considering an idle
message to mean that the cell has been parsed.
The internal ABI for ipython has changed between ipython version 2 and
3. In its current state, the result processor only works with IPython
version 2, so fail if the user wants to use the result processor with
the wrong version.
Abstract the ipython interface to a file so that we can make it support
versions 2 and 3 at the same time.