[IPython-user] Connecting to an open IPython shell remotely.

Fernando Perez fperez.net@gmail....
Sat Mar 10 02:28:23 CST 2007


On 3/8/07, Anthony Roy <home@antroy.co.uk> wrote:

> Now to some other hitches I have had. The scripts (in particular
> ipcluster) are heavily unix oriented. There are several non-windows
> compatible functions present. I've worked through them to get
> distributed computing working on my machine, at some point I'll take a
> look at making the scripts more robust and portable between *nix and
> windoze.

That would be very nice.  Yes, they are currently heavily
*nix-oriented because that's the environment all of us work in, and I
honestly don't even begin to imagine how to do some of these things
under windows.  But contributions on this front will be very welcome.

It's worth mentioning for windows users that the full test suite will
likely /never/ pass under windows.  It uses pexpect heavily, which is
a *nix-only tool.

> In the meantime, I am trying to use the engine/controller setup to
> control a separate IPython instance. The way I am currently attempting
> this is by starting a controller and an engine in separate consoles, and
> then starting a (controlling) IPython session and using it to start an
> IPython session on the engine in a separate thread. This sort of works.
> IPython is started in the engine (the load info is displayed) but then I
> am having trouble running commands in that engine console without stacks
> of errors!
>
> Is there a way of hooking python code into an engine such that it will
> run it once the engine has started? The idea being that there will be
> two threads running, one with the IPython instance, and the other the
> engine itself, which would be able to take commands from the controller
> and pass them to the IPython instance.

The shell config object file (see ipython1/config/objects.py) has an
attribute called filesToRun.  Brian will correct me if I'm wrong (I
haven't used the feature myself), but that should allow you to set a
filename to be loaded at engine startup.

The configfiles/ directory contains examples of config files you can
modify to add your specific initialization files.

Cheers,

f


More information about the IPython-user mailing list