(self, stream, data, command_id=None, end=None)
return self.wsman.send(self.resource_uri, send,
                               selector_set=self._selector_set)
Send the input data to the shell or command (if command_id is set)

        :param stream: The stream to send the data to
        :param data: The byte string of the data to send
        :param command_id: If the input data is for a command, then this
            specifies the Command ID it is for
        :param end: Whether this is the last input element for the command
        :return: The raw WSMan body of the response
Send the input data to the shell or command (if command_id is set)
Send the input data to the shell or command ( if command_id is set )
def send(self, stream, data, command_id=None, end=None):
        """
        Send the input data to the shell or command (if command_id is set)

        :param stream: The stream to send the data to
        :param data: The byte string of the data to send
        :param command_id: If the input data is for a command, then this
            specifies the Command ID it is for
        :param end: Whether this is the last input element for the command
        :return: The raw WSMan body of the response
        """
        rsp = NAMESPACES['rsp']

        send = ET.Element("{%s}Send" % rsp)
        stream = ET.SubElement(send, "{%s}Stream" % rsp, Name=stream)
        if end is not None:
            stream.attrib['End'] = str(end)
        if command_id is not None:
            stream.attrib['CommandId'] = command_id

        stream.text = base64.b64encode(data).decode('utf-8')
        return self.wsman.send(self.resource_uri, send,
                               selector_set=self._selector_set)
def send ( self , stream , data , command_id = None , end = None ) : rsp = NAMESPACES [ 'rsp' ] send = ET . Element ( "{%s}Send" % rsp ) stream = ET . SubElement ( send , "{%s}Stream" % rsp , Name = stream ) if end is not None : stream . attrib [ 'End' ] = str ( end ) if command_id is not None : stream . attrib [ 'CommandId' ] = command_id stream . text = base64 . b64encode ( data ) . decode ( 'utf-8' ) return self . wsman . send ( self . resource_uri , send , selector_set = self . _selector_set )