--- aliases: - /2010/02/stop-ipcluster-from-script categories: - python date: 2010-02-19 02:23 layout: post slug: stop-ipcluster-from-script title: Stop ipcluster from a script ---

Ipcluster is easy to start but not trivial to stop from a script, after having finished the processing, here's the solution:
from IPython.kernel import client
mec = client.MultiEngineClient()
mec.kill(controller=True)