summaryrefslogtreecommitdiff
path: root/docs/pycon2010/pirate2.py
diff options
context:
space:
mode:
Diffstat (limited to 'docs/pycon2010/pirate2.py')
-rw-r--r--docs/pycon2010/pirate2.py24
1 files changed, 0 insertions, 24 deletions
diff --git a/docs/pycon2010/pirate2.py b/docs/pycon2010/pirate2.py
deleted file mode 100644
index 343f94ff..00000000
--- a/docs/pycon2010/pirate2.py
+++ /dev/null
@@ -1,24 +0,0 @@
-# coding=utf-8
-from cmd import Cmd
-
-
-# using ``do_`` methods
-
-class Pirate(Cmd):
- gold = 3
-
- def do_loot(self, arg):
- 'Seize booty from a passing ship.'
- self.gold += 1
- print('Now we gots {0} doubloons'
- .format(self.gold))
-
- def do_drink(self, arg):
- 'Drown your sorrrows in rrrum.'
- self.gold -= 1
- print('Now we gots {0} doubloons'
- .format(self.gold))
-
-
-pirate = Pirate()
-pirate.cmdloop()