bundles / IPython latest / IPython / embed_kernel
function
IPython:embed_kernel
source: /IPython/__init__.py :74
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, optionalThe module to load into IPython globals (default: caller)
local_ns: dict, optionalThe namespace to load into IPython user namespace (default: caller)
**kwargs: various, optionalFurther keyword args are relayed to the IPKernelApp constructor, such as
config, a traitletsConfigobject (seeconfigure_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