Nathaniel Smith wrote:
On Thu, Apr 4, 2019 at 12:48 AM Greg Ewing <[email protected]> wrote:
output(args) --> (status, output)
Isn't this already available as: run(args, stdout=PIPE)?
Yes, but you need to do more than that to get the output
as a string. This is the relevant part of the implementation
of check_output():
process = Popen(stdout=PIPE, *popenargs, **kwargs)
output, unused_err = process.communicate()
retcode = process.poll()
--
Greg
_______________________________________________
Python-ideas mailing list
[email protected]
https://mail.python.org/mailman/listinfo/python-ideas
Code of Conduct: http://python.org/psf/codeofconduct/