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

bundles / IPython 9.5.0 / IPython / terminal / embed / InteractiveShellEmbed / mainloop

function

IPython.terminal.embed:InteractiveShellEmbed.mainloop

source: /IPython/terminal/embed.py :265

Signature

def   mainloop ( self local_ns = None module = None stack_depth = 0 compile_flags = None )

Summary

Embeds IPython into a running python program.

Parameters

local_ns, module

Working local namespace (a dict) and module (a module or similar object). If given as None, they are automatically taken from the scope where the shell was called, so that program variables become visible.

stack_depth : int

How many levels in the stack to go to looking for namespaces (when local_ns or module is None). This allows an intermediate caller to make sure that this function gets the namespace from the intended level in the stack. By default (0) it will get its locals and globals from the immediate caller.

compile_flags

A bit field identifying the __future__ features that are enabled, as passed to the builtin compile function. If given as None, they are automatically taken from the scope where the shell was called.

Aliases

  • IPython.terminal.embed.InteractiveShellEmbed.mainloop