Skip to main content

Turtle graphics on the web.

Project description

Tortoise: turtle graphics on the web

Version 0.1.0 License

tortoise library example

This repository is the proof of concept of an implementation, in Python, of turtle graphics based on web technologies. This is the main difference with the turtle module, which uses (t|T)kinter.

Cloning the repository (or retrieving the corresponding ZIP file) is sufficient to use this module. The main.py file, with which above picture were generated, is an example of use of this library. Simply launch python main.py from the root of the repository.

The module is also available on Pypi: https://pypi.org/project/tortoise/. Simply launch pip install tortoise to install it.

You can also test the library directly in your web browser, with nothing to install: http://q37.info/s/dj9b7ksf.

This Python module is part of a larger project that aims to provide a way to write modern examples or exercises for programming tutorials.

The tortoise library currently provides following methods:

  • getAngle(): returns the current angel,
  • up(): put the pen up,
  • down(): puts the pen down,
  • setAutoDraw(value): the drawing is automatically rendered each values movements (0 will disable the auto draw); call draw() to render remaining movements,
  • setPosition(x,y): the turtle jumps to x and y, relatively of the center of the drawing area,
  • forward(distance): the tortoise moves by the specified distance,
  • right(angle): the tortoise turns clockwise from angle degrees,
  • right(angle): the tortoise turns counter clockwise from angle degrees,
  • setColorRGB(r,g,b): sets the color of the pen following the RGB color model,
  • setColorHSL(h,s,l): sets the color of the pen following the HSL color model, (h: 0 - 360; s, l: 0 - 100%),
  • draw(); draws remaining movements.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

tortoise-0.1.0.tar.gz (3.8 kB view details)

Uploaded Source

Built Distribution

tortoise-0.1.0-py3-none-any.whl (5.0 kB view details)

Uploaded Python 3

File details

Details for the file tortoise-0.1.0.tar.gz.

File metadata

  • Download URL: tortoise-0.1.0.tar.gz
  • Upload date:
  • Size: 3.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/41.0.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.6.4

File hashes

Hashes for tortoise-0.1.0.tar.gz
Algorithm Hash digest
SHA256 fae13963d21f6a2b9f7b6a7b3e022047dd43e9468d2a07d48ea5b9ab1c0ec0f4
MD5 28b8511af4d3394a1b81dbb32c764663
BLAKE2b-256 499b18533ffa549d4bc7925cdf8bddee4fa4b9928caf1dd0ae5999b51c1b0138

See more details on using hashes here.

File details

Details for the file tortoise-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: tortoise-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 5.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/41.0.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.6.4

File hashes

Hashes for tortoise-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 aa9dcc22d8c81ad028cfbb9dabdc199159ac00934a1a9b57b9ca716faa4f4cec
MD5 b26a05375bd4bf53a649fc9c351e2e24
BLAKE2b-256 20e4df9b3a0f554580f767c957c7875b7e994f36d750e2f97bb0ec7dfca087f5

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page