Determine whether data read from ``input_`` should echo to ``output``. Used by `handle_stdin`; tests attributes of ``input_`` and ``output``. :param input_: Input stream (file-like object). :param output: Output stream (file-like object). :returns: A ``bool
(self, input_: IO, output: IO)
| 916 | time.sleep(self.input_sleep) |
| 917 | |
| 918 | def should_echo_stdin(self, input_: IO, output: IO) -> bool: |
| 919 | """ |
| 920 | Determine whether data read from ``input_`` should echo to ``output``. |
| 921 | |
| 922 | Used by `handle_stdin`; tests attributes of ``input_`` and ``output``. |
| 923 | |
| 924 | :param input_: Input stream (file-like object). |
| 925 | :param output: Output stream (file-like object). |
| 926 | :returns: A ``bool``. |
| 927 | |
| 928 | .. versionadded:: 1.0 |
| 929 | """ |
| 930 | return (not self.using_pty) and isatty(input_) |
| 931 | |
| 932 | def respond(self, buffer_: List[str]) -> None: |
| 933 | """ |