'Interpret the argument as though it had been typed in response
to the prompt.
This may be overridden, but should not normally need to be;
see the precmd() and postcmd() methods for useful execution hooks.
The return value is a flag indicating whether interpretation of
commands by the interpreter should stop.'

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))
        except AttributeError:
            return self.default(line)
        return func(arg)
