aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormarcusw2011-04-17 13:48:14 +0000
committermarcusw2011-04-17 13:48:14 +0000
commit6a35f0fd5366041dcfd5954c9d7f263dbaee9c70 (patch)
treee8d9ed468a6129caa1f1261db95631b6e028a910
parente288f23f0474b6225fb864bad5ba716ab3c3d134 (diff)
Added short help messages to the scripts.
-rw-r--r--scripts/nxt_filer5
-rw-r--r--scripts/nxt_push5
-rw-r--r--scripts/nxt_test6
3 files changed, 16 insertions, 0 deletions
diff --git a/scripts/nxt_filer b/scripts/nxt_filer
index 767d268..c933550 100644
--- a/scripts/nxt_filer
+++ b/scripts/nxt_filer
@@ -136,6 +136,11 @@ if __name__ == '__main__':
# FIXME: add dialog with progress bar when scanning bluetooth devices
arguments, keyword_arguments = parse_command_line_arguments(sys.argv)
+ if '--help' in arguments:
+ print '''nxt_filer -- Simple GUI to manage files on a LEGO Mindstorms NXT
+Usage: nxt_filer [--host <macaddress>]'''
+ exit(0)
+
brick = nxt.locator.find_one_brick(keyword_arguments['host'])
win = NXT_Filer(brick)
win.show_all()
diff --git a/scripts/nxt_push b/scripts/nxt_push
index 395b38f..8f2c7c6 100644
--- a/scripts/nxt_push
+++ b/scripts/nxt_push
@@ -41,6 +41,11 @@ def write_file(b, fname):
if __name__ == '__main__':
arguments, keyword_arguments = parse_command_line_arguments(sys.argv)
+
+ if '--help' in arguments:
+ print '''nxt_push -- Push a file to a LEGO Mindstorms NXT brick
+Usage: nxt_push [--host <macaddress>] <file>'''
+ exit(0)
brick = nxt.locator.find_one_brick(keyword_arguments['host'])
for filename in arguments:
diff --git a/scripts/nxt_test b/scripts/nxt_test
index 5cc0fcd..16eed5b 100644
--- a/scripts/nxt_test
+++ b/scripts/nxt_test
@@ -3,6 +3,12 @@
#Lists various information from all bricks it can connect to.
import sys, traceback
+
+if '--help' in sys.argv:
+ print '''nxt_test -- Tests the nxt-python setup and brick firmware interaction
+Usage: nxt_test (takes no arguments except --help)'''
+ exit(0)
+
import nxt.locator
import nxt.brick