'Run a single command. Exceptions should be caught by the caller'

def onecmd(self, line):

    (cmd, arg, line) = self.parseline(line)
    if (not line):
        return self.emptyline()
    if (cmd is None):
        return self.default(line)
    self.lastcmd = line
    if (cmd == ''):
        return self.default(line)
    else:
        try:
            func = getattr(self, ('do_' + cmd.lower()))
        except AttributeError:
            return self.default(line)
        return func(arg)
