code: def postloop(self) -> None:
          
          code = self.exit_code if self.exit_code is not None else 0
          self.poutput('{!r} exiting with code: {}'.format(sys.argv[0], code))
docs: Hook method executed once when the cmdloop() method is about to return.