diff docs/pycon2010/pirate7.py @ 356:d275d3beceff

fix usage help name-stripping bug
author catherine@dellzilla
date Wed, 17 Feb 2010 14:32:04 -0500
parents 8a5bc9f5c28e
children 89e38f922c25
line wrap: on
line diff
--- a/docs/pycon2010/pirate7.py	Wed Feb 17 12:32:49 2010 -0500
+++ b/docs/pycon2010/pirate7.py	Wed Feb 17 14:32:04 2010 -0500
@@ -35,8 +35,11 @@
     default_to_shell = True
     multilineCommands = ['sing']
     terminators = Cmd.terminators + ['...']
+    songcolor = 'blue'
+    settable = Cmd.settable + 'songcolor Color to ``sing`` in (red/blue/green/cyan/magenta, bold, underline)'
+    Cmd.shortcuts.update({'~': 'sing'})
     def do_sing(self, arg):
-        print(self.colorize(arg, 'blue'))
+        print(self.colorize(arg, self.songcolor))
 
 pirate = Pirate()
 pirate.cmdloop()
\ No newline at end of file