Skip to main content

Simple turtle system for JupyterLab

Project description

jupyterlab-jbturtle

Simple turtle module for JupyterLab

JBTurtle

  • This module uses Pillow
  • Attention: Almost impractical with FireFox because of FOUC. Do not use with FireFox.

Install

pip install Pillow
pip install jbturtle

Sample

from jbturtle import *

turtle = JBTurtle(640, 400)
nn = 0
for count in range(100):
  turtle.line_hsv(nn, 1, 1)
  turtle.forward(100)
  turtle.turn_right(85)
  nn += 5

Functions

  • JBTurtle(xs, ys)
    • Constructor
    • xs: x-size of workspace
    • ys: y-size of workspace
  • init(xs, ys)
    • Initialization
    • xs: x-size of workspace
    • ys: y-size of workspace
  • forward(dst)
  • turn_right(angle)
  • turn_left(angle)
  • move(x, y)
  • pen_up()
  • pen_down()
  • speed(spd)
  • line_width(lw)
  • line_color((r, g, b))
  • line_rgb(r, g, b)
  • line_hsv(h, s, v)

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

jbturtle-0.2.6.tar.gz (3.9 kB view hashes)

Uploaded Source

Built Distribution

jbturtle-0.2.6-py3-none-any.whl (6.0 kB view hashes)

Uploaded Python 3

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