comparison docs/unfreefeatures.rst @ 332:49bea7cab179

doc refreshing refresh.bash
author cat@eee
date Fri, 12 Feb 2010 22:15:04 -0500
parents 6306edc46a6e
children 45e70737791f
comparison
equal deleted inserted replaced
331:6306edc46a6e 332:49bea7cab179
187 Controls whether ``self.pfeedback('message')`` output is suppressed; 187 Controls whether ``self.pfeedback('message')`` output is suppressed;
188 useful for non-essential feedback that the user may not always want 188 useful for non-essential feedback that the user may not always want
189 to read. ``quiet`` is only relevant if 189 to read. ``quiet`` is only relevant if
190 ``app.pfeedback`` is sometimes used. 190 ``app.pfeedback`` is sometimes used.
191 191
192 ``select``
193 ==========
194
195 ``app.select`` is called from within a method (not by the user directly; it is ``app.select``, not ``app.do_select``).
196
197 .. automethod:: cmd2.Cmd.select
198
199 ::
200
201 def do_eat(self, arg):
202 sauce = self.select('sweet salty', 'Sauce? ')
203 result = '{food} with {sauce} sauce, yum!'
204 result = result.format(food=arg, sauce=sauce)
205 self.stdout.write(result + '\n')
206
207 ::
208
209 (Cmd) eat wheaties
210 1. sweet
211 2. salty
212 Sauce? 2
213 wheaties with salty sauce, yum!
214