Return a generator of frames read from socket. A frame is a tuple where the first item is the stream number and the second item is a chunk of data. If the tty setting is enabled, the streams are multiplexed into the stdout stream.
(socket, tty)
| 90 | |
| 91 | |
| 92 | def frames_iter(socket, tty): |
| 93 | """ |
| 94 | Return a generator of frames read from socket. A frame is a tuple where |
| 95 | the first item is the stream number and the second item is a chunk of data. |
| 96 | |
| 97 | If the tty setting is enabled, the streams are multiplexed into the stdout |
| 98 | stream. |
| 99 | """ |
| 100 | if tty: |
| 101 | return ((STDOUT, frame) for frame in frames_iter_tty(socket)) |
| 102 | else: |
| 103 | return frames_iter_no_tty(socket) |
| 104 | |
| 105 | |
| 106 | def frames_iter_no_tty(socket): |
no test coverage detected