<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def postcmd(self, stop, line):
 """Runs right before a command is about to return."""

        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