TODO as heck.
            See Python's cmd.Cmd.cmdloop for some (somewhat horrifying)
            example loops - that's what we're working similarly to.

def loop(self, intro=None):
        """ TODO as heck.
            See Python's cmd.Cmd.cmdloop for some (somewhat horrifying)
            example loops - that's what we're working similarly to.
        """
        self.fire("preloop")
        if intro is not None:
            self.intro = intro
        if self.intro is not None:
            self.stdout.write(self.intro + "\n")
            self.stdout.flush()
        stop = None
        while not stop:
            if self.use_rawinput:
                try:
                    line = self.inputter(self.prompt)
                except EOFError:
                    line = self._eof
            else:
                self.stdout.write(self.prompt)
                self.stdout.flush()
                line = self.stdin.readline()
                if not len(line):
                    line = self._eof
                else:
                    line = line.rstrip("\r\n")
            line = self.fire("precmd", line)
            stop, results = self.onecmd(line)
            stop, results = self.fire("postcmd", stop, results, line)
        self.fire("postloop")