Home | History | Annotate | Download | only in python2.7

Lines Matching defs:STDOUT

34             stdin=None, stdout=None, stderr=None,
70 stdin, stdout and stderr specify the executed programs' standard
76 parent. Additionally, stderr can be STDOUT, which indicates that the
78 file handle as for stdout.
95 If universal_newlines is true, the file objects stdout and stderr are
101 default). Also, the newlines attribute of the file objects stdout,
179 Interact with process: Send data to stdin. Read data from stdout
185 communicate() returns a tuple (stdout, stderr).
196 stdout
197 If the stdout argument is PIPE, this attribute is a file object
232 output = Popen(["mycmd", "myarg"], stdout=PIPE).communicate()[0]
239 p1 = Popen(["dmesg"], stdout=PIPE)
240 p2 = Popen(["grep", "hda"], stdin=p1.stdout, stdout=PIPE)
304 pipe = Popen("cmd", shell=True, bufsize=bufsize, stdout=PIPE).stdout
314 stdin=PIPE, stdout=PIPE, close_fds=True)
315 (child_stdin, child_stdout) = (p.stdin, p.stdout)
323 stdin=PIPE, stdout=PIPE, stderr=PIPE, close_fds=True)
326 child_stderr) = (p.stdin, p.stdout, p.stderr)
333 stdin=PIPE, stdout=PIPE, stderr=STDOUT, close_fds=True)
334 (child_stdin, child_stdout_and_stderr) = (p.stdin, p.stdout)
344 p = Popen(["/bin/ls", "-l"], bufsize=bufsize, stdin=PIPE, stdout=PIPE)
345 (child_stdin, child_stdout) = (p.stdin, p.stdout)
367 stdin=PIPE, stdout=PIPE, close_fds=True)
368 (child_stdout, child_stdin) = (p.stdout, p.stdin)
378 stdin=PIPE, stdout=PIPE, close_fds=True)
379 (child_stdout, child_stdin) = (p.stdout, p.stdin)
386 * stdin=PIPE and stdout=PIPE must be specified.
440 __all__ = ["Popen", "PIPE", "STDOUT", "call", "check_call",
472 STDOUT = -2
558 The stdout argument is not allowed as it is used internally.
559 To capture standard error in the result, use stderr=STDOUT.
563 ... stderr=STDOUT)
566 if 'stdout' in kwargs:
567 raise ValueError('stdout argument not allowed, it will be overridden.')
568 process = Popen(stdout=PIPE, *popenargs, **kwargs)
651 stdin=None, stdout=None, stderr=None,
666 if close_fds and (stdin is not None or stdout is not None or
669 "platforms if you redirect stdin/stdout/stderr")
680 self.stdout = None
692 # c2pread <--stdout--- c2pwrite
703 errread, errwrite) = self._get_handles(stdin, stdout, stderr)
720 if stdout == PIPE:
745 self.stdout = os.fdopen(c2pread, 'rU', bufsize)
747 self.stdout = os.fdopen(c2pread, 'rb', bufsize)
777 stdout and stderr, until end-of-file is reached. Wait for
782 communicate() returns a tuple (stdout, stderr)."""
786 if [self.stdin, self.stdout, self.stderr].count(None) >= 2:
787 stdout = None
797 elif self.stdout:
798 stdout = _eintr_retry_call(self.stdout.read)
799 self.stdout.close()
804 return (stdout, stderr)
817 def _get_handles(self, stdin, stdout, stderr):
821 if stdin is None and stdout is None and stderr is None:
841 if stdout is None:
845 elif stdout == PIPE:
847 elif isinstance(stdout, int):
848 c2pwrite = msvcrt.get_osfhandle(stdout)
851 c2pwrite = msvcrt.get_osfhandle(stdout.fileno())
860 elif stderr == STDOUT:
1007 stdout = None # Return
1010 if self.stdout:
1011 stdout = []
1013 args=(self.stdout, stdout))
1032 if self.stdout:
1038 if stdout is not None:
1039 stdout = stdout[0]
1048 if stdout:
1049 stdout = self._translate_newlines(stdout)
1054 return (stdout, stderr)
1089 def _get_handles(self, stdin, stdout, stderr):
1107 if stdout is None:
1109 elif stdout == PIPE:
1111 elif isinstance(stdout, int):
1112 c2pwrite = stdout
1115 c2pwrite = stdout.fileno()
1121 elif stderr == STDOUT:
1382 stdout, stderr = self._communicate_with_poll(input)
1384 stdout, stderr = self._communicate_with_select(input)
1387 if stdout is not None:
1388 stdout = ''.join(stdout)
1397 if stdout:
1398 stdout = self._translate_newlines(stdout)
1403 return (stdout, stderr)
1407 stdout = None # Return
1426 if self.stdout:
1427 register_and_append(self.stdout, select_POLLIN_POLLPRI)
1428 fd2output[self.stdout.fileno()] = stdout = []
1464 return (stdout, stderr)
1470 stdout = None # Return
1475 if self.stdout:
1476 read_set.append(self.stdout)
1477 stdout = []
1507 if self.stdout in rlist:
1508 data = os.read(self.stdout.fileno(), 1024)
1510 self.stdout.close()
1511 read_set.remove(self.stdout)
1512 stdout.append(data)
1521 return (stdout, stderr)
1544 plist = Popen(["ps"], stdout=PIPE).communicate()[0]
1559 p1 = Popen(["dmesg"], stdout=PIPE)
1560 p2 = Popen(["grep", "hda"], stdin=p1.stdout, stdout=PIPE)
1586 p1 = Popen("set", stdout=PIPE, shell=True)
1587 p2 = Popen('find "PROMPT"', stdin=p1.stdout, stdout=PIPE)