Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 15 additions & 5 deletions IPython/terminal/embed.py
Original file line number Diff line number Diff line change
Expand Up @@ -392,11 +392,21 @@ def embed(*, header="", compile_flags=None, **kwargs):
if config is None:
config = load_default_config()
config.InteractiveShellEmbed = config.TerminalInteractiveShell
kwargs['config'] = config
using = kwargs.get('using', 'sync')
if using :
kwargs['config'].update({'TerminalInteractiveShell':{'loop_runner':using, 'colors':'NoColor', 'autoawait': using!='sync'}})
#save ps1/ps2 if defined
kwargs["config"] = config
using = kwargs.get("using", "sync")
colors = kwargs.get("colors", "NoColor")
print(colors, using)
if using:
kwargs["config"].update(
{
"TerminalInteractiveShell": {
"loop_runner": using,
"colors": colors,
"autoawait": using != "sync",
}
}
)
# save ps1/ps2 if defined
ps1 = None
ps2 = None
try:
Expand Down