manim
manim copied to clipboard
Code Class not work
Describe the bug
the Code Class not work. just raise Exception.
class DemoScene(Scene):
def construct(self):
c = Code('sorted(iterable, key=None, reverse=False)')
self.play(FadeIn(c))
self.wait()
Wrong display or Error traceback:
Additional context
you can use
solve #2355
from manimlib import *
class CodeClassWorking(Scene):
def construct(self):
# Insted
c = Code(
"""
from manimlib import *
class Test(InteractiveScene):
def construct(self):
pass
"""
)
self.play(
Write(c)
)
Output
https://github.com/user-attachments/assets/7cecd88c-7beb-4581-b30c-6c669238fff0