comparison example/example.py @ 291:dfdbd93a2fae

bugfixes to set
author catherine@bothari
date Fri, 06 Nov 2009 22:09:57 -0500
parents cd12e4e0fa17
children 30af90fd46c5
comparison
equal deleted inserted replaced
290:cd12e4e0fa17 291:dfdbd93a2fae
5 5
6 class CmdLineApp(Cmd): 6 class CmdLineApp(Cmd):
7 multilineCommands = ['orate'] 7 multilineCommands = ['orate']
8 Cmd.shortcuts.update({'&': 'speak'}) 8 Cmd.shortcuts.update({'&': 'speak'})
9 maxrepeats = 3 9 maxrepeats = 3
10 Cmd.settable.append('maxrepeats Max number of `--repeat` allowed') 10 Cmd.settable.append('maxrepeats Max number of `--repeat`s allowed')
11 11
12 @options([make_option('-p', '--piglatin', action="store_true", help="atinLay"), 12 @options([make_option('-p', '--piglatin', action="store_true", help="atinLay"),
13 make_option('-s', '--shout', action="store_true", help="N00B EMULATION MODE"), 13 make_option('-s', '--shout', action="store_true", help="N00B EMULATION MODE"),
14 make_option('-r', '--repeat', type="int", help="output [n] times") 14 make_option('-r', '--repeat', type="int", help="output [n] times")
15 ]) 15 ])