'run_to_end(process, tty = False, timeout = Timeout.default, env = None) -> str
Run a command on the remote server and return a tuple with
(data, exit_status). If `tty` is True, then the command is run inside
a TTY on the remote server.
Examples:
>>> s =  ssh(host=\'example.pwnme\',
...         user=\'travis\',
...         password=\'demopass\')
>>> print s.run_to_end(\'echo Hello; exit 17\')
(\'Hello\n\', 17)'

def run_to_end(self, process, tty=False, wd=None, env=None):

    with context.local(log_level='ERROR'):
        c = self.run(process, tty, wd=wd, timeout=Timeout.default)
        data = c.recvall()
        retcode = c.wait()
        c.close()
        return (data, retcode)
