Mercurial > sqlpython
annotate testcmd.py @ 28:dd1cc6630a65
test files
author | devlinjs@FA7CZA6N1254998.wrightpatterson.afmc.ds.af.mil |
---|---|
date | Thu, 20 Dec 2007 13:48:56 -0500 |
parents | |
children | 2739250177ed |
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 settable = ['prompt', 'binarypar'] |
dd1cc6630a65
test files
devlinjs@FA7CZA6N1254998.wrightpatterson.afmc.ds.af.mil
parents:
diff
changeset
|
6 def do_sing(self, arg): |
dd1cc6630a65
test files
devlinjs@FA7CZA6N1254998.wrightpatterson.afmc.ds.af.mil
parents:
diff
changeset
|
7 '''Sings. |
dd1cc6630a65
test files
devlinjs@FA7CZA6N1254998.wrightpatterson.afmc.ds.af.mil
parents:
diff
changeset
|
8 |
dd1cc6630a65
test files
devlinjs@FA7CZA6N1254998.wrightpatterson.afmc.ds.af.mil
parents:
diff
changeset
|
9 Hums if it has to fake it.''' |
dd1cc6630a65
test files
devlinjs@FA7CZA6N1254998.wrightpatterson.afmc.ds.af.mil
parents:
diff
changeset
|
10 print arg or 'hmm hmm hmm' |
dd1cc6630a65
test files
devlinjs@FA7CZA6N1254998.wrightpatterson.afmc.ds.af.mil
parents:
diff
changeset
|
11 def do_shout(self, arg): |
dd1cc6630a65
test files
devlinjs@FA7CZA6N1254998.wrightpatterson.afmc.ds.af.mil
parents:
diff
changeset
|
12 print arg.upper() |
dd1cc6630a65
test files
devlinjs@FA7CZA6N1254998.wrightpatterson.afmc.ds.af.mil
parents:
diff
changeset
|
13 def do_quit(self, arg): |
dd1cc6630a65
test files
devlinjs@FA7CZA6N1254998.wrightpatterson.afmc.ds.af.mil
parents:
diff
changeset
|
14 return 1 |
dd1cc6630a65
test files
devlinjs@FA7CZA6N1254998.wrightpatterson.afmc.ds.af.mil
parents:
diff
changeset
|
15 multilineCommands = ['shout'] |
dd1cc6630a65
test files
devlinjs@FA7CZA6N1254998.wrightpatterson.afmc.ds.af.mil
parents:
diff
changeset
|
16 |
dd1cc6630a65
test files
devlinjs@FA7CZA6N1254998.wrightpatterson.afmc.ds.af.mil
parents:
diff
changeset
|
17 t = test() |
dd1cc6630a65
test files
devlinjs@FA7CZA6N1254998.wrightpatterson.afmc.ds.af.mil
parents:
diff
changeset
|
18 t.cmdloop() |