IPython 8.4.0 Pypi GitHub Homepage
Other Docs
BackRef
embed(*, header='', compile_flags=None, **kwargs)

The first invocation of this will create an InteractiveShellEmbed instance and then call it. Consecutive calls just call the already created instance.

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_ipython() instead.

Here is a simple example:

from IPython import embed
a = 10
b = 20
embed(header='First time')
c = 30
d = 40
embed()

Full customization can be done by passing a Config in as the config argument.

Call this to embed IPython at the current point in your program.

Examples

See :

Back References

The following pages refer to to this document either explicitly or contain code examples using this.

IPython.start_ipython IPython.core.magics.basic.AsyncMagics.autoawait

Local connectivity graph

Hover to see nodes names; edges to Self not shown, Caped at 50 nodes.

Using a canvas is more power efficient and can get hundred of nodes ; but does not allow hyperlinks; , arrows or text (beyond on hover)

SVG is more flexible but power hungry; and does not scale well to 50 + nodes.

All aboves nodes referred to, (or are referred from) current nodes; Edges from Self to other have been omitted (or all nodes would be connected to the central node "self" which is not useful). Nodes are colored by the library they belong to, and scaled with the number of references pointing them


GitHub : /IPython/terminal/embed.py#350
type: <class 'function'>
Commit: