diff docs/pycon2010/pirate6.py @ 374:89e38f922c25

font sizes up
author cat@eee
date Sat, 20 Feb 2010 00:11:34 -0500
parents bf314710e64b
children 32b9137577b8
line wrap: on
line diff
--- a/docs/pycon2010/pirate6.py	Fri Feb 19 12:20:44 2010 -0500
+++ b/docs/pycon2010/pirate6.py	Sat Feb 20 00:11:34 2010 -0500
@@ -1,11 +1,12 @@
-from cmd7 import Cmd
+from cmd import Cmd
 # prompts and defaults
 
 class Pirate(Cmd):
     gold = 3
     prompt = 'arrr> '
     def default(self, line):
-        print('What mean ye by "{0}"?'.format(line))
+        print('What mean ye by "{0}"?'
+              .format(line))
     def do_loot(self, arg):
         'Seize booty from a passing ship.'
         self.gold += 1
@@ -24,10 +25,11 @@
         return line
     def postcmd(self, stop, line):   
         if self.gold != self.initial_gold:
-            print('Now we gots {0} doubloons'.format(self.gold))
+            print('Now we gots {0} doubloons'
+                  .format(self.gold))
         if self.gold < 0:
-            print("Off to debtorrr's prison.  Game overrr.")
-            return True
+            print("Off to debtorrr's prison.")
+            stop = True
         return stop
     def do_quit(self, arg):
         print("Quiterrr!")