mirror of
https://github.com/3b1b/manim.git
synced 2025-08-01 17:29:06 +08:00
Change where exception mode is set, to be quieter
This commit is contained in:
@ -232,7 +232,11 @@ class Scene(object):
|
|||||||
# the local namespace of the caller
|
# the local namespace of the caller
|
||||||
caller_frame = inspect.currentframe().f_back
|
caller_frame = inspect.currentframe().f_back
|
||||||
module = get_module(caller_frame.f_globals["__file__"])
|
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
|
self.shell = shell
|
||||||
|
|
||||||
# Add a few custom shortcuts to that local namespace
|
# Add a few custom shortcuts to that local namespace
|
||||||
@ -288,9 +292,6 @@ class Scene(object):
|
|||||||
|
|
||||||
shell.set_custom_exc((Exception,), custom_exc)
|
shell.set_custom_exc((Exception,), custom_exc)
|
||||||
|
|
||||||
# Set desired exception mode
|
|
||||||
shell.magic(f"xmode {self.embed_exception_mode}")
|
|
||||||
|
|
||||||
# Launch shell
|
# Launch shell
|
||||||
shell()
|
shell()
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user