Skip to main content

Turtles using IPython Display

Project description

WIP

Please note that this is still being actively developed, hence may not work properly for you!

IPythonDisplayTurtle

An implementation of the classic turtle module mainly implemented using IPython.display, IPython.HTML, and paperscript. Can be used with Jupyter Notebooks, and in places where ipywidgets are not supported. Only requires one way communication to work, so great for remote server cases. Also has level drawing capabilities. You can check the source code yourself for more info!

How to install from a terminal/command prompt:

pip install IPythonDisplayTurtle

To install from a jupyter notebook cell:

!pip install IPythonDisplayTurtle

How to use:

from IPythonDisplayTurtle import Snake

colours=["red","orange","yellow","green","blue","purple"]
divisions = 12
angle = 360/divisions 

t = Snake(_pendown = 0)
for i in range(divisions):
    if(i%2 == 0):
        t.pendown()
        t.pencolor(colours[int(i/2)%len(colours)])
    else:
        t.penup()
    t.goforward(300/divisions)
    t.turnright(angle)
t.penup()
t.goforward(120)
t.turnright(360)

t.display()

Example Turtle

Binder

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

IPythonDisplayTurtle-0.0.33.tar.gz (94.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

IPythonDisplayTurtle-0.0.33-py3-none-any.whl (97.3 kB view details)

Uploaded Python 3

File details

Details for the file IPythonDisplayTurtle-0.0.33.tar.gz.

File metadata

  • Download URL: IPythonDisplayTurtle-0.0.33.tar.gz
  • Upload date:
  • Size: 94.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/45.2.0.post20200210 requests-toolbelt/0.9.1 tqdm/4.42.1 CPython/3.7.6

File hashes

Hashes for IPythonDisplayTurtle-0.0.33.tar.gz
Algorithm Hash digest
SHA256 ee52ae8a7b47b5e3a7bfd3e633009de894bf71090718570f65e5cdb405ee87d6
MD5 1d38a1365db94aca6af34feff7bb2b33
BLAKE2b-256 58efa4f2a1bdace1eaa2995934ea014335e528420891600223734c5e39255c0d

See more details on using hashes here.

File details

Details for the file IPythonDisplayTurtle-0.0.33-py3-none-any.whl.

File metadata

  • Download URL: IPythonDisplayTurtle-0.0.33-py3-none-any.whl
  • Upload date:
  • Size: 97.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/45.2.0.post20200210 requests-toolbelt/0.9.1 tqdm/4.42.1 CPython/3.7.6

File hashes

Hashes for IPythonDisplayTurtle-0.0.33-py3-none-any.whl
Algorithm Hash digest
SHA256 0e8d818746df2ae92afbf74182b531b5ccc9112859d5c2f77fd46ae14b6e21b3
MD5 83d3d882b7b8877fc308d386c66aa111
BLAKE2b-256 8412c5b8280bbdf07064da3187d91864394f0ecd29988e31bd3b70f8346a6825

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