Read the next chunk of output from the shell.
(self)
| 122 | self._current_output = "" |
| 123 | |
| 124 | def read(self): |
| 125 | """ Read the next chunk of output from the shell. |
| 126 | """ |
| 127 | new_text = os.read(self.master_fd, 10240).decode() |
| 128 | self._current_output += new_text |
| 129 | if self._current_output.endswith('autosh$ '): |
| 130 | self.command_finished.set() |
| 131 | |
| 132 | async def __call__(self, command): |
| 133 | ''' Send a command to the shell and return the output. |