Lines Matching refs:stdin
438 pass a string to the subprocess's stdin. If you use this argument
439 you may not also use the Popen constructor's "stdin" argument, as
524 pass bytes or a string to the subprocess's stdin. If you use this argument
525 you may not also use the Popen constructor's "stdin" argument, as
537 if kwargs.get('stdin') is not None:
538 raise ValueError('stdin and input arguments may not both be used.')
539 kwargs['stdin'] = PIPE
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,
859 self.stdin = None
980 # p2cwrite ---stdin---> p2cread
992 errread, errwrite) = self._get_handles(stdin, stdout, stderr)
1010 self.stdin = io.open(p2cwrite, 'wb', bufsize)
1012 self.stdin = io.TextIOWrapper(self.stdin, write_through=True,
1037 for f in filter(None, (self.stdin, self.stdout, self.stderr)):
1045 if stdin == PIPE:
1098 if self.stdin:
1099 self.stdin.close()
1143 self.stdin.write(input)
1148 # bpo-19612, bpo-30418: On Windows, stdin.write() fails
1156 self.stdin.close()
1166 """Interact with process: Send data to stdin and close it.
1190 [self.stdin, self.stdout, self.stderr].count(None) >= 2):
1193 if self.stdin:
1335 def _get_handles(self, stdin, stdout, stderr):
1339 if stdin is None and stdout is None and stderr is None:
1347 if stdin is None:
1354 elif stdin == PIPE:
1358 elif stdin == DEVNULL:
1360 elif isinstance(stdin, int):
1361 p2cread = msvcrt.get_osfhandle(stdin)
1364 p2cread = msvcrt.get_osfhandle(stdin.fileno())
1619 if self.stdin:
1686 def _get_handles(self, stdin, stdout, stderr):
1695 if stdin is None:
1697 elif stdin == PIPE:
1702 elif stdin == DEVNULL:
1704 elif isinstance(stdin, int):
1705 p2cread = stdin
1708 p2cread = stdin.fileno()
2056 if self.stdin and not self._communication_started:
2058 # been writing to .stdin in an uncontrolled fashion.
2060 self.stdin.flush()
2065 self.stdin.close()
2091 if self.stdin and input:
2092 selector.register(self.stdin, selectors.EVENT_WRITE)
2115 if key.fileobj is self.stdin:
2161 if self.stdin and self._input is None:
2165 self._input = self._input.encode(self.stdin.encoding,
2166 self.stdin.errors)