def get_output(self):
if self.process.poll() is not None:<EOL><INDENT>self.close()<EOL>yield None, None<EOL><DEDENT>while not (self.stdout_queue.empty() and self.stderr_queue.empty()):<EOL><INDENT>if not self.stdout_queue.empty():<EOL><INDENT>line = self.stdout_queue.get().decode('<STR_LIT:utf-8>')<EOL>yield line, None<EOL><DEDENT>if not self.stderr_queue.empty():<EOL><INDENT>line = self.stderr_queue.get().decode('<STR_LIT:utf-8>')<EOL>yield None, line<EOL><DEDENT><DEDENT>
:yield: stdout_line, stderr_line, running

Generator that outputs lines captured from stdout and stderr

These can be consumed to output on a widget in an IDE