Mercurial > sqlpython
annotate testcmd.py @ 59:3828db4f3c94
minor bugfixes
author | catherine@cordelia |
---|---|
date | Wed, 02 Apr 2008 22:47:06 -0400 |
parents | 2739250177ed |
children |
rev | line source |
---|---|
28
dd1cc6630a65
test files
devlinjs@FA7CZA6N1254998.wrightpatterson.afmc.ds.af.mil
parents:
diff
changeset
|
1 import cmd2 |
dd1cc6630a65
test files
devlinjs@FA7CZA6N1254998.wrightpatterson.afmc.ds.af.mil
parents:
diff
changeset
|
2 |
dd1cc6630a65
test files
devlinjs@FA7CZA6N1254998.wrightpatterson.afmc.ds.af.mil
parents:
diff
changeset
|
3 class test(cmd2.Cmd): |
dd1cc6630a65
test files
devlinjs@FA7CZA6N1254998.wrightpatterson.afmc.ds.af.mil
parents:
diff
changeset
|
4 binarypar = True |
dd1cc6630a65
test files
devlinjs@FA7CZA6N1254998.wrightpatterson.afmc.ds.af.mil
parents:
diff
changeset
|
5 def do_sing(self, arg): |
dd1cc6630a65
test files
devlinjs@FA7CZA6N1254998.wrightpatterson.afmc.ds.af.mil
parents:
diff
changeset
|
6 '''Sings. |
dd1cc6630a65
test files
devlinjs@FA7CZA6N1254998.wrightpatterson.afmc.ds.af.mil
parents:
diff
changeset
|
7 |
dd1cc6630a65
test files
devlinjs@FA7CZA6N1254998.wrightpatterson.afmc.ds.af.mil
parents:
diff
changeset
|
8 Hums if it has to fake it.''' |
dd1cc6630a65
test files
devlinjs@FA7CZA6N1254998.wrightpatterson.afmc.ds.af.mil
parents:
diff
changeset
|
9 print arg or 'hmm hmm hmm' |
dd1cc6630a65
test files
devlinjs@FA7CZA6N1254998.wrightpatterson.afmc.ds.af.mil
parents:
diff
changeset
|
10 def do_shout(self, arg): |
dd1cc6630a65
test files
devlinjs@FA7CZA6N1254998.wrightpatterson.afmc.ds.af.mil
parents:
diff
changeset
|
11 print arg.upper() |
dd1cc6630a65
test files
devlinjs@FA7CZA6N1254998.wrightpatterson.afmc.ds.af.mil
parents:
diff
changeset
|
12 def do_quit(self, arg): |
dd1cc6630a65
test files
devlinjs@FA7CZA6N1254998.wrightpatterson.afmc.ds.af.mil
parents:
diff
changeset
|
13 return 1 |
dd1cc6630a65
test files
devlinjs@FA7CZA6N1254998.wrightpatterson.afmc.ds.af.mil
parents:
diff
changeset
|
14 multilineCommands = ['shout'] |
dd1cc6630a65
test files
devlinjs@FA7CZA6N1254998.wrightpatterson.afmc.ds.af.mil
parents:
diff
changeset
|
15 |
dd1cc6630a65
test files
devlinjs@FA7CZA6N1254998.wrightpatterson.afmc.ds.af.mil
parents:
diff
changeset
|
16 t = test() |
dd1cc6630a65
test files
devlinjs@FA7CZA6N1254998.wrightpatterson.afmc.ds.af.mil
parents:
diff
changeset
|
17 t.cmdloop() |