Skip to main content

Extention of the built in Turtle package

Project description

Turtle Extentions

LOGO

Docs:

Install:

  • Open CMD Prompt by pressing the windows button and typing cmd, then hit enter
  • Type py -m pip install TurtleExtentions (Windows) or python pip install TurtleExtentions (Linux/MacOS)
  • Import the module inside the code like this:
import TurtleExtentions as TE
# Code here

Basic shapes and arguments:

Basic Shapes:

  • The Shape class contains all basic shapes
  • To use it, just type
import TurtleExtentions as TE
TE.Shape.ShapeHere(params)
  • Lets make a hexagon appear
TE.Shape.Hexagon(Size=50) # The size by default is 20
  • To change its position just use the pos1 and pos2 arguments
TE.Shape.Hexagon(Size=50, pos1=150, pos2=150) # Default positons are 100, 100
  • Now by default this would not be filled in. To do so set the DoFill paramater to True
  • You can also edit the fillcolor with the FillColor paramater like this
TE.Shape.Hexagon(Size=50, pos1=150, pos2=150, DoFill=True, FillColor="Green")
  • That would result in this HEXAGON-SHAPE-DOCS

  • Now if you want to delete the last drawn shape, simply use the Remove_Shape function

TE.Shape.Hexagon()
TE.Shape.Remove_Shape()
  • And if you want to delete a certain shape, just set the index of your shape! (Note: The shapes are stored in a list, therefore the index starts at 0)
TE.Shape.Hexagon()
TE.Shape.Triangle()
TE.Shape.Remove_Shape(0)
  • Which results in the hexagon getting deleted.

Release 0.0.6.5

  • Remove_Shape function now supports to index what shape to delete! First shape is always index 1!
  • Fixed Remove_Shape function. Hopefully...

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

TurtleEssentials-0.0.6.5.tar.gz (2.7 kB view details)

Uploaded Source

File details

Details for the file TurtleEssentials-0.0.6.5.tar.gz.

File metadata

  • Download URL: TurtleEssentials-0.0.6.5.tar.gz
  • Upload date:
  • Size: 2.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.12.0

File hashes

Hashes for TurtleEssentials-0.0.6.5.tar.gz
Algorithm Hash digest
SHA256 16703ad9042e5e3cb4d9833b5dd62ab9c5a5eb5fb3dfdae11a2bc46ed558c7c3
MD5 38f7eaa1bc6930aa3e1b5be7304253e5
BLAKE2b-256 cf6ee0c060ad99e396a16e16994d92fcc920e2bf778120a0b1e3b80f6f735a7f

See more details on using hashes here.

Supported by

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