Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
A Python interface to Scratch
Python
tree: ef8b3ed60d

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
scratch
tests
.gitignore
README.md

README.md

scratchpy

A Python connection class for Scratch

Getting Started

  1. Start up Scratch

  2. Enable remote sensor connections, or "Host Mesh" in BYOB

  3. Create a variable foo

>>> import scratch
>>> s = scratch.Scratch(host='localhost')
>>> s.broadcast("Hello, Scratch!")
>>> s.receive()
{'broadcast': [], 'sensor-update': {'foo': '0'}}
>>> 
Something went wrong with that request. Please try again.