3 ms·
also there is turtle graphics library as part of the python standard library - pyturtle. https://docs.python.org/3.8/library/turtle.html https://docs.python.org
by MichaelMoser123 3y ago
also there is turtle graphics library as part of the python standard library - pyturtle. https://docs.python.org/3.8/library/turtle.html https://docs.python.org/3.8/library/turtle.html
Al Sweigart wrote a nice tutorial here: https://github.com/asweigart/simple-turtle-tutorial-for-python/blob/master/simple_turtle_tutorial.md https://github.com/asweigart/simple-turtle-tutorial-for-pyth...
Turns out that pyturtle has a nice beginner friendly interface with global functions (I overlooked it at first). The library makes this on the fly with a nice trick: https://github.com/python/cpython/blob/f978a79130133de1cf26436c460ff169cf5c8dc5/Lib/turtle.py#L3976C5-L3976C23 https://github.com/python/cpython/blob/f978a79130133de1cf264...
they make a global function for each of methods of the turtle class by means of eval.