def command(self, cmd, timeout=600):
        s = self._intf
        s.send(str(cmd))
        s.send("\r")
        s.readline() # eat command that was just sent
        resp = s.wait_for_prompt(timeout)
        s.send("echo $?\r")
        s.readline() # eat echo line
        #ret = s.readline()
        ret = s.wait_for_prompt()
        ret = ExitStatus(cmd, int(ret)<<8)
        return resp, ret
Send a shell command and return the output and the exit status.
dataset/ETHPy150Open kdart/pycopia/QA/pycopia/QA/ssh_controller.py/ShellController.command