bundles / IPython 9.5.0 / IPython / terminal / embed / EmbeddedMagics / kill_embedded
function
IPython.terminal.embed:EmbeddedMagics.kill_embedded
source: /IPython/terminal/embed.py :34
Signature
def kill_embedded ( self , parameter_s = '' ) Summary
::
Extended Summary
%kill_embedded [-i] [-x] [-y]
%kill_embeddeddeactivate for good the current embedded IPython
This function (after asking for confirmation) sets an internal flag so that an embedded IPython will never activate again for the given call location. This is useful to permanently disable a shell that is being called inside a loop: once you've figured out what you needed from it, you may then kill it and the program will then continue to run without the interactive shell interfering again.
Kill Instance Option:
If for some reasons you need to kill the location where the instance is created and not called, for example if you create a single instance in one place and debug in many locations, you can use the
--instanceoption to kill this specific instance. Like for thecall locationkilling an "instance" should work even if it is recreated within a loop.
options:
-i, --instance Kill instance instead of call location -x, --exit Also exit the current session -y, --yes Do not ask confirmation
Aliases
-
IPython.terminal.embed.EmbeddedMagics.kill_embedded