Skip to main content

Python A-Turtle

Project description

Python A-Trutle is a library that implements Turtle Graphics with asyncio support.

A short capability summary:

  • Supports both sync and asyncio compatible coroutine API.

  • Multiple turtle support with either vector or bitmap shapes.

  • Concurrent animation support via the coroutine API.

  • Built on top of the Standard Library’s tkinter module.

  • Sprite support (essentially turtles that don’t draw lines)

  • More.

Installation

Python A-Turtle is a pure Python package distributed via PyPI. Install it with:

$ pip install aturtle

For improved bitmap image rotation speed and quality, install the optional Pillow extra with:

$ pip install aturtle[pillow]

Quick Start

import aturtle

w = aturtle.Window()
sh = aturtle.shapes.vector.Triangle(radius=20, angle=0)
s = aturtle.create_sprite(w, sh, update=True)
t = aturtle.turtle.Turtle(s)
t.sync_forward(100)

Thanks

  • To the creators and maintainers of Tcl/Tk, a programming language I used for a while in the late 1990’s, in particular for the seriously under-appreciated Canvas widget which is amazingly powerful. Python embeds the Tcl/Tk interpreter in the form of the tkinter Standard Library module. Long live Tcl/Tk and tkinter!

  • To whoever Quarks is, for sharing an effective technique for debouncing Tk KeyPress / KeyRelease events in towards the end of this thread.

  • To Terry Pratchet, for his Discworld novels and, in particular, for Great A’Tuin, the “Giant Star Turtle (…) who travels through the Discworld universe’s space, carrying four giant elephants (…) who in turn carry the Discworld.”, which has come to my mind often while creating this.

About

Python A-Turtle is being created by Tiago Montes.

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

aturtle-1.0.0a0.tar.gz (21.2 kB view details)

Uploaded Source

Built Distribution

aturtle-1.0.0a0-py2.py3-none-any.whl (24.5 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file aturtle-1.0.0a0.tar.gz.

File metadata

  • Download URL: aturtle-1.0.0a0.tar.gz
  • Upload date:
  • Size: 21.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/42.0.2 requests-toolbelt/0.9.1 tqdm/4.41.1 CPython/3.8.1

File hashes

Hashes for aturtle-1.0.0a0.tar.gz
Algorithm Hash digest
SHA256 b82396cf15c15618f0575a275b0de6e4261fe710ba485ab243d48714ca0a32b7
MD5 4ea5bfcd7cf6beaf89010dfd68f90a0f
BLAKE2b-256 44664054643be744e68d1e0699d8e648b2121bad38fbdfab718482862829c1bf

See more details on using hashes here.

File details

Details for the file aturtle-1.0.0a0-py2.py3-none-any.whl.

File metadata

  • Download URL: aturtle-1.0.0a0-py2.py3-none-any.whl
  • Upload date:
  • Size: 24.5 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/42.0.2 requests-toolbelt/0.9.1 tqdm/4.41.1 CPython/3.8.1

File hashes

Hashes for aturtle-1.0.0a0-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 2b358ccc3c6be769fd9fbebfc5999b400ba58d8f4011ca9627b9782fad477bfe
MD5 e7f156fee8fe9db4b7730bc9dd0f5940
BLAKE2b-256 06e5ed8647cfe4d020259cb76a86426411cd2ede908172b6f9efaa2f83fcf4ac

See more details on using hashes here.

Supported by

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