def cmd(self, argv):
        """Run one command and exit.

            "argv" is the arglist for the command to run. argv[0] is the
                command to run. If argv is an empty list then the
                'emptyline' handler is run.

        Returns the return value from the command handler.
        """
        assert isinstance(argv, (list, tuple)), \
                "'argv' is not a sequence: %r" % argv
        retval = None
        try:
            argv = self.precmd(argv)
            retval = self.onecmd(argv)
            self.postcmd(argv)
        except:
            if not self.cmdexc(argv):
                raise
            retval = 1
        return retval
Run one command and exit.

            "argv" is the arglist for the command to run. argv[0] is the
                command to run. If argv is an empty list then the
                'emptyline' handler is run.

        Returns the return value from the command handler.