def embed_kernel(module=None, local_ns=None, **kwargs):
 (caller_module, caller_locals) = extract_module_locals(1)
 if (module is None):
  module = caller_module
 if (local_ns is None):
  local_ns = caller_locals
 from ipykernel.embed import embed_kernel as real_embed_kernel
 real_embed_kernel(module=module, local_ns=local_ns, **kwargs)

def embed_kernel ( module = None , local_ns = None , ** kwargs ) : ( caller_module , caller_locals ) = extract_module_locals ( 1 ) if ( module is None ) : module = caller_module if ( local_ns is None ) : local_ns = caller_locals from ipykernel . embed import embed_kernel as real_embed_kernel real_embed_kernel ( module = module , local_ns = local_ns , ** kwargs )
embed and start an ipython kernel in a given scope .