summaryrefslogtreecommitdiff
path: root/nxt-python-fantom/examples/message_test.py
diff options
context:
space:
mode:
authorTat-Chee Wan (USM)2011-03-01 09:10:13 +0800
committerTat-Chee Wan (USM)2011-03-01 09:10:13 +0800
commit5b5271e98c6d7f0ffea9d6b3fbf2cec43d283d64 (patch)
tree87624772defa75852f127d519a252686b2a338ba /nxt-python-fantom/examples/message_test.py
parenta017874bb2a7881aaaf57832049fe281191c05c2 (diff)
Imported nxt-python baseline (v2.1.0)
Diffstat (limited to 'nxt-python-fantom/examples/message_test.py')
-rw-r--r--nxt-python-fantom/examples/message_test.py15
1 files changed, 15 insertions, 0 deletions
diff --git a/nxt-python-fantom/examples/message_test.py b/nxt-python-fantom/examples/message_test.py
new file mode 100644
index 0000000..c2fbda7
--- /dev/null
+++ b/nxt-python-fantom/examples/message_test.py
@@ -0,0 +1,15 @@
+#!/usr/bin/env python
+
+#During this test you need to run any program on the brick
+#which doesn't use the messaging system. Most programs fit
+#this requirement.
+
+import nxt.locator
+
+b = nxt.locator.find_one_brick()
+for box in range(10):
+ b.message_write(box, 'message test %d' % box)
+for box in range(10):
+ local_box, message = b.message_read(box, box, True)
+ print local_box, message
+print 'Test succeeded!'