Lines Matching refs:stdout

26 STDOUT:  Special value that indicates that stderr should go to stdout
36 stdout instead of a return code
131 cmd, returncode, stdout, stderr, output
152 def stdout(self):
156 @stdout.setter
157 def stdout(self, value):
159 # .stdout is a transparent alias for .output
168 cmd, output, stdout, stderr, timeout
181 def stdout(self):
184 @stdout.setter
185 def stdout(self, value):
187 # .stdout is a transparent alias for .output
429 The stdout argument is not allowed as it is used internally.
452 for kw in ('stdout', 'check'):
466 return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
467 **kwargs).stdout
478 stdout: The standard output (None if not captured).
481 def __init__(self, args, returncode, stdout=None, stderr=None):
484 self.stdout = stdout
490 if self.stdout is not None:
491 args.append('stdout={!r}'.format(self.stdout))
502 raise CalledProcessError(self.returncode, self.args, self.stdout,
510 The returned instance will have attributes args, returncode, stdout and
511 stderr. By default, stdout and stderr are not captured, and those attributes
512 will be None. Pass stdout=PIPE and/or stderr=PIPE in order to capture them,
529 be bytes, and the stdout and stderr will be bytes. If in text mode, any
530 "input" should be a string, and stdout and stderr will be strings decoded
542 if kwargs.get('stdout') is not None or kwargs.get('stderr') is not None:
543 raise ValueError('stdout and stderr arguments may not be used '
545 kwargs['stdout'] = PIPE
550 stdout, stderr = process.communicate(input, timeout=timeout)
559 exc.stdout, exc.stderr = process.communicate()
572 output=stdout, stderr=stderr)
573 return CompletedProcess(process.args, retcode, stdout, stderr)
682 """Return output (stdout or stderr) of executing cmd in a shell.
758 creating the stdin/stdout/stderr pipe file objects
762 stdin, stdout and stderr: These specify the executed programs' standard
776 text: If true, decode stdin, stdout and stderr using the given encoding
800 file objects stdin, stdout and stderr.
803 stdin, stdout, stderr, pid, returncode
808 stdin=None, stdout=None, stderr=None,
860 self.stdout = None
981 # c2pread <--stdout--- c2pwrite
992 errread, errwrite) = self._get_handles(stdin, stdout, stderr)
1016 self.stdout = io.open(c2pread, 'rb', bufsize)
1018 self.stdout = io.TextIOWrapper(self.stdout,
1037 for f in filter(None, (self.stdin, self.stdout, self.stderr)):
1047 if stdout == PIPE:
1093 if self.stdout:
1094 self.stdout.close()
1167 Read data from stdout and stderr, until end-of-file is
1172 communicate() returns a tuple (stdout, stderr).
1175 "input" should be bytes, and the (stdout, stderr) will be bytes.
1177 be a string, and (stdout, stderr) will be strings decoded
1190 [self.stdin, self.stdout, self.stderr].count(None) >= 2):
1191 stdout = None
1195 elif self.stdout:
1196 stdout = self.stdout.read()
1197 self.stdout.close()
1209 stdout, stderr = self._communicate(input, endtime, timeout)
1230 return (stdout, stderr)
1335 def _get_handles(self, stdin, stdout, stderr):
1339 if stdin is None and stdout is None and stderr is None:
1367 if stdout is None:
1374 elif stdout == PIPE:
1378 elif stdout == DEVNULL:
1380 elif isinstance(stdout, int):
1381 c2pwrite = msvcrt.get_osfhandle(stdout)
1384 c2pwrite = msvcrt.get_osfhandle(stdout.fileno())
1604 if self.stdout and not hasattr(self, "_stdout_buff"):
1608 args=(self.stdout, self._stdout_buff))
1625 if self.stdout is not None:
1636 stdout = None
1638 if self.stdout:
1639 stdout = self._stdout_buff
1640 self.stdout.close()
1646 stdout = stdout[0] if stdout else None
1649 return (stdout, stderr)
1686 def _get_handles(self, stdin, stdout, stderr):
1710 if stdout is None:
1712 elif stdout == PIPE:
1717 elif stdout == DEVNULL:
1719 elif isinstance(stdout, int):
1720 c2pwrite = stdout
1723 c2pwrite = stdout.fileno()
1735 else: # child's stdout is not set, use parent's stdout
2069 stdout = None
2075 if self.stdout:
2076 self._fileobj2output[self.stdout] = []
2080 if self.stdout:
2081 stdout = self._fileobj2output[self.stdout]
2093 if self.stdout and not self.stdout.closed:
2094 selector.register(self.stdout, selectors.EVENT_READ)
2102 stdout, stderr,
2109 self._check_timeout(endtime, orig_timeout, stdout, stderr)
2127 elif key.fileobj in (self.stdout, self.stderr):
2137 if stdout is not None:
2138 stdout = b''.join(stdout)
2145 if stdout is not None:
2146 stdout = self._translate_newlines(stdout,
2147 self.stdout.encoding,
2148 self.stdout.errors)
2154 return (stdout, stderr)