Write encoded ``data`` to the running process' stdin. :param data: A Unicode string. :returns: ``None``. .. versionadded:: 1.0
(self, data: str)
| 1021 | time.sleep(self.input_sleep) |
| 1022 | |
| 1023 | def write_proc_stdin(self, data: str) -> None: |
| 1024 | """ |
| 1025 | Write encoded ``data`` to the running process' stdin. |
| 1026 | |
| 1027 | :param data: A Unicode string. |
| 1028 | |
| 1029 | :returns: ``None``. |
| 1030 | |
| 1031 | .. versionadded:: 1.0 |
| 1032 | """ |
| 1033 | # Encode always, then request implementing subclass to perform the |
| 1034 | # actual write to subprocess' stdin. |
| 1035 | self._write_proc_stdin(data.encode(self.encoding)) |
| 1036 | |
| 1037 | def decode(self, data: bytes) -> str: |
| 1038 | """ |
no test coverage detected