[IPython-user] ipython1: cleaning up engines

Fernando Perez fperez.net@gmail....
Fri Jan 4 04:16:33 CST 2008

On Jan 4, 2008 1:58 AM, Vincent Schut <schut@sarvision.nl> wrote:
> Hi ipython folks,
> toying with ipython1's distributed computing, nice!
> However, I wonder if there is a way to force an engine/all engines to
> really clean up or restart, without having to switch to my ssh console,
> kill the engines, and restart them. Because every time I make a change
> to the source of the class of which instances are being distributed, the
> engines just fail to reload my new version and keep reusing the old one,
> probably because python usually only imports a module once. Issueing a
> rc.clearPropertiesAll() does not work, the only thing that seems to work
> is hard restarting all engines. Did I miss something? Is there a simple
> way to force my engines to return to a really clean state?

We currently don't have a full 'engine restart' command, but it's
certainly in the plans, along with options for killing remote engines
and doing other types of process-level control of the engines from
within the controller, even when the engines may be unresponsive due
to being stuck in extension code, for example.

But for now, you could do the kind of thing that can also be issued at
an interactive single-session ipython, which is to use the reload()
command.  You can tell all of your engines to


and they will all reload the foo module.  Assuming that you've made
the updated source available to the engines, this will work for all
non-extension modules.

Does that help (at least partially)?



More information about the IPython-user mailing list