Change where exception mode is set, to be quieter

This commit is contained in:
Grant Sanderson 2024-11-30 10:08:54 -06:00
parent d78fe93743
commit f8280a12be

View file

@ -232,7 +232,11 @@ class Scene(object):
# the local namespace of the caller
caller_frame = inspect.currentframe().f_back
module = get_module(caller_frame.f_globals["__file__"])
shell = InteractiveShellEmbed(user_module=module)
shell = InteractiveShellEmbed(
user_module=module,
display_banner=False,
xmode=self.embed_exception_mode
)
self.shell = shell
# Add a few custom shortcuts to that local namespace
@ -288,9 +292,6 @@ class Scene(object):
shell.set_custom_exc((Exception,), custom_exc)
# Set desired exception mode
shell.magic(f"xmode {self.embed_exception_mode}")
# Launch shell
shell()