comparison example/example.py @ 435:bfbe4241bd6b

custom double-redirector fixed
author catherine.devlin@gmail.com
date Thu, 25 Aug 2011 15:24:56 -0400
parents f16f444a4d10
children
comparison
equal deleted inserted replaced
434:742fd308f0c9 435:bfbe4241bd6b
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 redirector = '->'
10 Cmd.settable.append('maxrepeats Max number of `--repeat`s allowed') 11 Cmd.settable.append('maxrepeats Max number of `--repeat`s allowed')
11 12
12 @options([make_option('-p', '--piglatin', action="store_true", help="atinLay"), 13 @options([make_option('-p', '--piglatin', action="store_true", help="atinLay"),
13 make_option('-s', '--shout', action="store_true", help="N00B EMULATION MODE"), 14 make_option('-s', '--shout', action="store_true", help="N00B EMULATION MODE"),
14 make_option('-r', '--repeat', type="int", help="output [n] times") 15 make_option('-r', '--repeat', type="int", help="output [n] times")