'Send a message to a command line.'

def send_message(self, message='', **kwargs):

    try:
        proc = subprocess.Popen(self.command, universal_newlines=True, stdin=subprocess.PIPE, shell=True)
        proc.communicate(input=message)
        if (proc.returncode != 0):
            _LOGGER.error('Command    failed:    %s', self.command)
    except subprocess.SubprocessError:
        _LOGGER.error('Error    trying    to    exec    Command:    %s', self.command)
