Package: iturtle
Interactive TurtleA custom Jupyter widget for interactive turtle.InstallationYou can install usingpip:pipinstalliturtleHere is the suggested conda environment:condacreate-nturtle-cconda-forgepython=3.10jupyterlab=3.5UsageLogo is an educational programming language, designed in 1967 by Wally Feurzeig, Seymour Papert, and Cynthia Solomon. Logo is not an acronym: the name was coined by Feurzeig while he was at Bolt, Beranek and Newman, and derives from the Greek logos, meaning word or thought.Interactive Turtle is an implementation of Logo programming language as a Jupyter Widget for Jupyter Lab. Interactive Turtle is a popular way for introducing programming to kids and beginners.Imagine a robotic turtle starting at the middle of the coordinate plane. After anfrom iturtle import Turtleand creating instancet = Turtle(), give it the commandt.forward(15), and it moves15pixels in the direction it is facing, drawing a line as it moves. Give it the commandt.right(25), and it rotates in-place 25 degrees clockwise.By combining together these and similar commands, intricate shapes and pictures can easily be drawn.For example, intricate shapes can be drawn by repeating simple moves:from iturtle import Turtle

turtle = Turtle()
turtle.pencolor("gold")

for i in range(36):
    turtle.forward(300)
    turtle.left(170)Please check the following samples:IntroductionStarSpiralCurrently Interactive Turtle supports these methods:Turtle motionhome()Move turtle to the origin – by default the middle of the coordinate plane – and set its heading to its start-orientation which is to the right (east).turtle.home()forward()orfd()Move the turtle forward by the specified distance, in the direction the turtle is headed.turtle.forward(20)backward()orbk()Move the turtle backward by the specified distance, in the direction the turtle is headed.turtle.backward(20)left()orlt()Turn turtle left by angle units. Units are by default degrees.turtle.left(90)right()orrt()Turn turtle right by angle units. Units are by default degrees.turtle.right(90)speed()Set the turtle’s speed to an integer value in the range 0..10.Speeds from1to10enforce increasingly faster animation of line drawing and turtle turning.turtle.speed(1)Pen controlpenup()orpu()Pull the pen up – no drawing when moving.turtle.penup()pendown()orpd()Pull the pen down – drawing when moving.turtle.pendown()pencolor()Set the color of the pen.You can set pen color to color string, which is a color specification string, such as "red", "yellow", or "#33cc8c".turtle.pencolor("red")You can also set pen color to the RGB color represented by r, g, and b. Each of r, g, and b must be in the range 0..255.turtle.pencolor(255, 255, 255)bgcolor()Set background color of the turtle canvas.You can set background color to color string, which is a color specification string, such as "red", "yellow", or "#33cc8c".turtle.bgcolor("black")goto()Move turtle to an absolute position. If the pen is down, draw line. Do not change the turtle’s orientation.turtle.goto(10, 10)teleport()Move turtle to an absolute position. Unlikegoto(x, y), a line will not be drawn. The turtle's orientation does not change.turtle.teleport(20, 30)Development InstallationCreate a dev environment:condaenvcreate-fenvironment.ymlInstall the python. This will also build the TS package.pipinstall-e".[test, examples]"When developing your extensions, you need to manually enable your extensions with the
lab frontend. For lab, this is done by the command:jupyter labextension develop --overwrite .
jlpm run buildHow to see your changesIf you use JupyterLab to develop then you can watch the source directory and run JupyterLab at the same time in different
terminals to watch for changes in the extension's source and automatically rebuild the widget.Watch the source directory in one terminal, automatically rebuilding when needed:jlpmrunwatchRun JupyterLab in another terminal:jupyterlab--no-browserAfter a change wait for the build to finish and then refresh your browser and the changes should take effect.If you make a change to the python code then you will need to restart the notebook kernel to have it take effect.