You are viewing an older version (9.10.0). Go to latest (9.13.0)
{ } Raw JSON

bundles / IPython 9.10.0 / IPython / embed_kernel

function

IPython:embed_kernel

source: /IPython/__init__.py :75

Signature

def   embed_kernel ( module = None local_ns = None ** kwargs )

Summary

Embed and start an IPython kernel in a given scope.

Extended Summary

If you don't want the kernel to initialize the namespace from the scope of the surrounding function, and/or you want to load full IPython configuration, you probably want IPython.start_kernel() instead.

This is a deprecated alias for ipykernel.embed.embed_kernel(), to be removed in the future. You should import directly from ipykernel.embed; this wrapper fails anyway if you don't have ipykernel package installed.

Parameters

module : types.ModuleType, optional

The module to load into IPython globals (default: caller)

local_ns : dict, optional

The namespace to load into IPython user namespace (default: caller)

**kwargs : various, optional

Further keyword args are relayed to the IPKernelApp constructor, such as config, a traitlets Config object (see configure_start_ipython), allowing configuration of the kernel. Will only have an effect on the first embed_kernel call for a given process.

Aliases

  • IPython.embed_kernel

Referenced by