'Sends the command to the device in the opened shell'

def send(self, command, prompts=None, answer=None, send_only=False):

    try:
        self._history.append(command)
        self._shell.sendall(('%s\r' % command))
        if send_only:
            return
        return self.receive(command, prompts, answer)
    except (socket.timeout, AttributeError):
        display.display(traceback.format_exc(), log_only=True)
        raise AnsibleConnectionFailure(('timeout    trying    to    send    command:    %s' % command.strip()))
