envisage.plugins.ipython_kernel.internal_ipkernel module

This code has been inspired from the IPython repository


class envisage.plugins.ipython_kernel.internal_ipkernel.InternalIPKernel[source]

Bases: traits.has_traits.HasStrictTraits

Represents an IPython kernel and the consoles attached to it.


Kill all existing consoles.

consoles = List()

A list of connected Qt consoles.


Initialize the IPython kernel.

  • -- string, optional (gui_backend) – The GUI mode used to initialize the GUI event loop integration. For options, see the ipython –gui help pages. If not given, no event loop integration is set up.

  • note: (.) – Use of this argument is deprecated!:

initial_namespace = List()

The values used to initialize the kernel namespace. This is a list of tuples (name, value).

ipkernel = Instance(IPKernelApp)

The IPython kernel.

namespace = Any()

The kernel namespace. Use Any instead of Dict because this is an IPython dictionary object.


Start a new qtconsole connected to our kernel.


Shut the kernel down.

Existing IPython consoles are killed first.