1

I tried mobilechelonian module to use a turtle in python jupyter notebook in different clouds (google collab or a server available for my school). On both servers, the module can be installed or is already installed:

%pip install mobilechelonian

yields (three first lines):

Requirement already satisfied: mobilechelonian in /opt/conda/lib/python3.8/site-packages (0.5)
Requirement already satisfied: ipywidgets>=7.0.0 in /opt/conda/lib/python3.8/site-packages (from mobilechelonian) (7.6.3)
Requirement already satisfied: IPython in /opt/conda/lib/python3.8/site-packages (from mobilechelonian) (7.19.0)
Requirement already satisfied: pygments in /opt/conda/lib/python3.8/site-packages (from IPython->mobilechelonian) (2.7.2)

I just copied and pasted the demo code in a cell:

from mobilechelonian import Turtle
t = Turtle()
t.speed(5)
colours=["red","blue","yellow","brown","black","purple","green"]

t.penup(); t.left(90); t.forward(200);t.right(90);t.pendown()
for i in range (0,18):
    t.pencolor(colours[i%7])
    t.right(20)
    t.forward(50)

t.right(180)
t.home()
 

The results is no the waited colored polygon but an cell with the output:

Turtle()

Thank you for suggestions to solve this problem.

Jean-Pat
  • 1,839
  • 4
  • 24
  • 41

1 Answers1

0

For some reasons, the notebook displays the drawing when launched from a classical jupyter notebook and fails when launched from jupyterlab.

Jean-Pat
  • 1,839
  • 4
  • 24
  • 41