Lines Matching defs:output

12 features, mainly that we get access to the subprocess output while it
14 progress information and filter output in real time.
29 PIPE_PTY = -3 # Pipe output through a pty
34 """Like subprocess.Popen with ptys and incremental output
36 This class deals with running a child process and filtering its output on
38 progress, and possibly relay the output to the user if requested.
46 1. Rather than getting the output data only at the end, this class sends it
48 2. We use pseudo terminals so that the child will hopefully flush its output
52 Use communicate_filter() to handle output from the subprocess.
104 """Convert stdout/stderr data to the correct format for output
116 def communicate_filter(self, output, input_buf=''):
122 The output function is sent all output from the subprocess and must be
125 def output([self,] stream, data)
127 stream: the stream the output was received on, which will be
138 output: Function to call with each fragment of output.
144 Note that the interleaved output will only be sensible if you have
146 the timing of the output in the subprocess. If a subprocess flips
148 read the output from each we may see several lines in each, and will read
157 and the combined output will just be the same as stdout.
218 if output:
219 stop_now = output(sys.stdout, data)
233 if output:
234 stop_now = output(sys.stderr, data)
274 def output(self, stream, data):
288 """Basic checks that the output looks sane."""
299 plist = Popen(['ps']).communicate_filter(oper.output)
306 plist = Popen([cmd], shell=True).communicate_filter(oper.output)
316 plist = Popen([cmd], shell=True).communicate_filter(oper.output)
325 plist = Popen(cmd, shell=False).communicate_filter(oper.output)
334 plist = Popen(cmd, shell=True).communicate_filter(oper.output)
343 oper.output)
355 plist = Popen(cmd, shell=True, env=env).communicate_filter(oper.output)
374 shell=True).communicate_filter(oper.output)
387 plist = Popen(both_cmds, shell=True).communicate_filter(oper.output)
395 shell=True).communicate_filter(oper.output)