code: def postcmd(self, stop, line):
          
          if self.gold != self.initial_gold:
              self.poutput('Now we gots {0} doubloons'.format(self.gold))
          if self.gold < 0:
              self.poutput("Off to debtorrr's prison.")
              stop = True
          return stop
docs: Runs right before a command is about to return.