changeset 375:6cc12ad6e616

options in pirate8.py slide
author cat@eee
date Sat, 20 Feb 2010 09:26:33 -0500
parents 89e38f922c25
children 32b9137577b8
files docs/pycon2010/pycon2010.rst
diffstat 1 files changed, 5 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/docs/pycon2010/pycon2010.rst	Sat Feb 20 00:11:34 2010 -0500
+++ b/docs/pycon2010/pycon2010.rst	Sat Feb 20 09:26:33 2010 -0500
@@ -304,6 +304,11 @@
 
 ::
 
+    @options([make_option('--ho', type='int', default=2,
+                          help="How often to chant 'ho'"),
+              make_option('-c', '--commas',
+                          action="store_true", 
+                          help="Intersperse commas")])
     def do_yo(self, arg, opts):
         chant = ['yo'] + ['ho'] * opts.ho
         separator = ', ' if opts.commas else ' '