mirror of
https://github.com/3b1b/manim.git
synced 2025-04-13 09:47:07 +00:00
Minor tweak to reload_scene
This commit is contained in:
parent
284c1d8f2c
commit
d21fbd02bc
1 changed files with 7 additions and 4 deletions
|
@ -127,13 +127,16 @@ def reload_scene(embed_line: int | None = None) -> None:
|
|||
`set_custom_exc` method, we cannot break out of the IPython shell by
|
||||
this means.
|
||||
"""
|
||||
shell = get_ipython()
|
||||
if not shell:
|
||||
return
|
||||
|
||||
# Update the global run configuration
|
||||
run_config = get_global_config()["run"]
|
||||
run_config["is_reload"] = True
|
||||
if embed_line:
|
||||
run_config["embed_line"] = embed_line
|
||||
|
||||
shell = get_ipython()
|
||||
if shell:
|
||||
print("Reloading...")
|
||||
shell.run_line_magic("exit_raise", "")
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue