Turtle-based graphics library for drawing various shapes centered on the cursor. Also adds printed descriptions of what is drawn, including for built-in turtle functions.
Project description
turtleBeads
A library that provides some convenient functions for drawing shapes using Python's built-in turtle graphics. These shapes are drawn centered on the cursor, and are thus analogous to beads on a string.
It also provides a few different convenience functions like leap
and
hop
which help move around without drawing, and augments the built-in
turtle functions causing them to print out a description of what they
draw, with functions describeAs
and endDescription
allowing for
custom text descriptions of complex shapes.
Designed by Peter Mawhorter.
Dependencies
None.
Installing
To install from PyPI, run the following command on the command-line:
python -m pip install turtleBeads
Once it's installed, you can run the built-in examples using:
python -m turtleBeads
Documentation
See the documentation for more details on how to use it and what each function does.
Changelog
- 1.1.2: Added better error checking for
drawDot
. Flipped order of changelog. - 1.1.1: Improved printed output for dots.
- 1.1.0:
- Introduced
font
andfixedWidthFont
functions to allow font selection for drawing text. - Introduced
drawTextInBox
andfontSizeForTextInBox
for auto-sizing of fixed-width text. - Introduced
drawPath
for drawing paths possibly with arrows on the ends. - Fixed a bug where using
describeAs
and thendrawText
would result in aRecursionError
. - Made
describeAs
/endDescription
maintain a stack of descriptions so that sub-objects trying to describe themselves doesn't end the description of a complex object (and their descriptions are suppressed).
- Introduced
- <1.1.0: Didn't keep a changelog.
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
Built Distribution
File details
Details for the file turtleBeads-1.1.2.tar.gz
.
File metadata
- Download URL: turtleBeads-1.1.2.tar.gz
- Upload date:
- Size: 14.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.10.8
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4104c2762ad4ca5cc453bd9a673e2bab846b77bcb6c8f5dcce6c0b4d2e5a2f48 |
|
MD5 | 1f5fc04df4a75a44ad9e4462a3dbdb35 |
|
BLAKE2b-256 | 3b10d6791f4522824b60e492182ca6d61635cc86448463e717083c8fa24231b1 |
File details
Details for the file turtleBeads-1.1.2-py3-none-any.whl
.
File metadata
- Download URL: turtleBeads-1.1.2-py3-none-any.whl
- Upload date:
- Size: 14.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.10.8
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | c0667bc2f0bf899611269a822137f1c85d3b844fe7d88a96fcb774ca9fe1a317 |
|
MD5 | 44207167f0efe1c94a609a0634f8f497 |
|
BLAKE2b-256 | b6a930caa5c516b31ddac5786255a826365f17ed662af64c9634c164d5f8bdbc |