annotate testcmd.py @ 30:2739250177ed

load fixed?
author devlinjs@FA7CZA6N1254998.wrightpatterson.afmc.ds.af.mil
date Fri, 21 Dec 2007 14:00:11 -0500
parents dd1cc6630a65
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()