ivanov / vim-ipython

A two-way integration between Vim and IPython 0.11+
http://github.com/ivanov/vim-ipython
1.04k stars 163 forks source link

support connection_file-based IPython connection #13

Closed minrk closed 13 years ago

minrk commented 13 years ago

new in 0.12 (not even in master yet, actually, so probably don't merge until ipython/ipython #847 gets in, in case of changes.

I also fixed a small issue where buffer.name could be None in my environment, causing persistent 'IPython not connected' messages.

I've never really used vim before, so this could definitely not be right, but it seems to work.

ivanov commented 13 years ago

thanks, I started poking around as well, which is why i was quiet - sorry.

ivanov commented 13 years ago

should i just copy paste from kernelapp's load_connection_file? seems inelegant - and i'm pretty lost as to what the difference is now between a kernelapp and a blockingkernelmanager

ivanov commented 13 years ago

ok, seems to work here, as well, thanks for this Min!

minrk commented 13 years ago

KernelManager has its own load_connection_file, so I don't know why you would be copying anything. Note that you must have an up to date version of my branch in the PR, as I just added this method when I realized it was necessary for third party clients.

KernelApp is the entry point for the actual kernel process (in IPython, there is typically one App per process). A KernelManager is an object for starting/stopping/communicating with the kernel. The only thing that has really changed here is the connection info is communicated between the KernelManager and the Kernel via a file instead of the command line.

ivanov commented 13 years ago

yes yes, the "should i copy paste" comment came before I pulled your freshly updated PR, sorry to have seemed so dense.

hmm, so is there no easy way to get the plain "--existing" functionality here? i guess it's related to the profiles comment i just made on ipython/ipython#847

minrk commented 13 years ago

hmm, so is there no easy way to get the plain "--existing" functionality here? i guess it's related to the profiles comment i just made on ipython/ipython#847

There is, if you clone the glob/sort code from the qtconsole app. If it's deemed sufficiently useful, I can pull that out into a standalone function for easier reuse.