This is hopefully where things start to get interesting. This is a script which, when loaded, turns on all the LEDs. (More correctly, it illuminates an eight-by-eight block of LEDs, regardless of monome size.)
The main body of the script looks like this:
lightBlock = Block(8, 8)
lightBlock.fill(LampState.ON)
renderer.render(lightBlock)
When this runs, the LEDs will come on. In fact, they'll stay on even when other scripts are loaded, so this script is slightly antisocial; we'll deal with cleaning up script actions later.
We'll look at the statements in order:
This creates an object called
lightBlock which is a
shado Block: a rectangular matrix of lamp settings. To light up the monome's LEDs, we need to set these lamps to an "on" state:
lightBlock.fill(LampState.ON)
This isn't quite enough to actually light the LEDs. To do that, we need to
render the Block out to the monome itself.
renderer.render(lightBlock)
Before these statements will work we need to do some book-keeping. Names like
Block,
LampState and
renderer need to be imported into the script so that the Python system knows where to find them. The import statements look like this:
from net.loadbang.shado import Block
from net.loadbang.shado.types import LampState
from config import renderer
The first two statements (those mentioning
net.loadbang.shado) refer to components inside the
shado package. The third statement is actually referring to another file of Python statements (called
config.py), which does some local configuration such as establishing communication settings for the monome.
Before the script runs:

After the script runs:
Full Script
'''
When launched, this script turns on all LEDs.
'''from net.loadbang.shado import Block
from net.loadbang.shado.types import LampState
from config import rendererlightBlock = Block(8, 8)
lightBlock.fill(LampState.ON)
renderer.render(lightBlock)