Mercurial > python-cmd2
diff example/example.py @ 310:9d91406ca3a7
select polished
author | catherine@dellzilla |
---|---|
date | Fri, 29 Jan 2010 11:26:23 -0500 |
parents | 1941e54cb776 |
children | 4172feeddf76 |
line wrap: on
line diff
--- a/example/example.py Fri Jan 29 10:32:40 2010 -0500 +++ b/example/example.py Fri Jan 29 11:26:23 2010 -0500 @@ -25,11 +25,7 @@ self.stdout.write(arg) self.stdout.write('\n') # self.stdout.write is better than "print", because Cmd can be - # initialized with a non-standard output destination - def do_sel(self, arg): - opts = arg.split() - result = self.select(opts) - self.poutput('yay for %s' % result) + # initialized with a non-standard output destination do_say = do_speak # now "say" is a synonym for "speak" do_orate = do_speak # another synonym, but this one takes multi-line input