diff options
| author | blob8108 <blob8108@gmail.com> | 2014-01-05 23:42:53 +0000 |
|---|---|---|
| committer | blob8108 <blob8108@gmail.com> | 2014-01-05 23:42:53 +0000 |
| commit | aebd5fca0d44cb98f7aad913bb8abe77261e8065 (patch) | |
| tree | 410771883a207899a39ad0a23a20ec6285b2f568 /example.py | |
| parent | 830d200bd1e1002d6f0356b22963e1caa516cd80 (diff) | |
| download | blockext-aebd5fca0d44cb98f7aad913bb8abe77261e8065.tar.gz blockext-aebd5fca0d44cb98f7aad913bb8abe77261e8065.zip | |
Add `problem` and `reset` decorators
Fixes #5
Diffstat (limited to 'example.py')
| -rw-r--r-- | example.py | 15 |
1 files changed, 15 insertions, 0 deletions
@@ -91,6 +91,21 @@ def move(steps): } """ +@problem +def my_problem(): + return "The Scratch Sensor board is not connected. Foo." + +@reset +def my_reset(): + print(""" + Reset! The red stop button has been clicked, + And now everything is how it was. + ... + (Poetry's not my strong point, you understand.) + """) + + + if __name__ == "__main__": blockext.run("Fancy Spaceship", "spaceship", 1234) |
