[IPython-user] Connecting to an open IPython shell remotely.
Tue Mar 6 16:03:36 CST 2007
On 3/6/07, Anthony Roy <firstname.lastname@example.org> wrote:
> Hi all,
> I use IPython on a daily basis for python development, and have been
> thinking about the networking features of IPython. I don't know a great
> deal about the distributed computing setup of IPython, and so I'm
> looking for a few pointers as to its capabilities.
> I'm toying with the idea of a Slime-like setup for Python with Vim. The
> train of thought gos something like this: Vim is extendable using
> Python; IPython has networking capabilities for distributed computing;
> Get Vim to connect to a running instance of IPython for a truly powerful
> setup - i.e. push code to IPython from Vim rather than the (useful, but
> less powerful) edit magic command.
> Anyone familiar with the Slime mode for emacs for interacting with the
> common lisp top-level (video on using it here http://tinyurl.com/2douro)
> will kow what a powerful concept this is. Essentially, aside from the
> obvious benefits of being able to send snippets of code (or whole
> buffers) from vim to ipython, you'd be able to essentially control a
> running python program (assuming it was started in an IPython shell)
> from a remote machine on the network.
> So my questions are these:
> 1) Can IPython be started in 'server' mode; i.e. so that remote
> processes can connect to it through an API.
Yes, effectively the ipython engines from ipython1 do precisely that.
> 2) If so, can remote processes push code to the IPython shell
Yes, they can. There's a remote control interface that can be used
for this. The talks Brian gave at PyCon have demos of this:
While he was using it interactively, the same execution calls can be
made from within any python program (in fact I use it that way all the
> 3) Where is the best place to start to get a handle on how to do this
> sort of thing?
We know things are still under-documented, but they work ;) Don't
hesitate to ask...
More information about the IPython-user