(self, pipe, word)
Write keyboard input to pipe.
Write keyboard input to pipe.
Write keyboard input to pipe .
def _send_input(self, pipe, word):
        """Write keyboard input to pipe."""
        # for shell input, send CRLF or LF depending on platform
        self._last_command.extend(word)
        bytes_word = b''.join(word) + b'\r\n'
        unicode_word = self._codepage.bytes_to_unicode(
            bytes_word, preserve=CONTROL, box_protect=False
        )
        # cmd.exe /u outputs UTF-16 but does not accept it as input...
        pipe.write(unicode_word.encode(SHELL_ENCODING, errors='replace'))
def _send_input ( self , pipe , word ) : # for shell input, send CRLF or LF depending on platform self . _last_command . extend ( word ) bytes_word = b'' . join ( word ) + b'\r\n' unicode_word = self . _codepage . bytes_to_unicode ( bytes_word , preserve = CONTROL , box_protect = False ) # cmd.exe /u outputs UTF-16 but does not accept it as input... pipe . write ( unicode_word . encode ( SHELL_ENCODING , errors = 'replace' ) )