(self, data)
| 61 | preexec_fn=preexec_func) |
| 62 | |
| 63 | def _write(self, data): |
| 64 | if not self.proc or self.proc.stdin.closed: |
| 65 | raise Exception('SSH subprocess not initiated.' |
| 66 | 'connect() must be called first.') |
| 67 | written = self.proc.stdin.write(data) |
| 68 | self.proc.stdin.flush() |
| 69 | return written |
| 70 | |
| 71 | def sendall(self, data): |
| 72 | self._write(data) |