You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
TL;DR Is it possible to run Turtle in the black window of the Editor tab?
It's great to see that Brython includes a Turtle Graphics package.
Unfortunately the example code in the Gallery tab doesn't work in the Editor tab. Is this sort of by design?
When I copy and paste the Turtle demo square with default turtle gallery code into the Editor and run the script I get the following error:
Traceback (most recent call last):
File , line 3, in
KeyError: turtle-div
I suspect this is because the HTML code for the Editor tab doesn't include <div id="turtle-div" section.
If I change the 'turtle-div' in the turtle_canvas_wrapper line to 'main_container' turtle does run but the turtle draws above the editor.
Could the page source of the Editor tab be modified to include a div for the black window?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
TL;DR Is it possible to run Turtle in the black window of the Editor tab?
It's great to see that Brython includes a Turtle Graphics package.
Unfortunately the example code in the Gallery tab doesn't work in the Editor tab. Is this sort of by design?
When I copy and paste the Turtle demo square with default turtle gallery code into the Editor and run the script I get the following error:
Traceback (most recent call last):
File , line 3, in
KeyError: turtle-div
I suspect this is because the HTML code for the Editor tab doesn't include <div id="turtle-div" section.
If I change the 'turtle-div' in the turtle_canvas_wrapper line to 'main_container' turtle does run but the turtle draws above the editor.
Could the page source of the Editor tab be modified to include a div for the black window?
Thanks in advance
Beta Was this translation helpful? Give feedback.
All reactions