[issue32102] Add "capture_output=True" option to subprocess.run

2018-08-09 Thread miss-islington


Change by miss-islington :


--
pull_requests: +8205

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue32102] Add "capture_output=True" option to subprocess.run

2018-08-09 Thread Andriy Maletsky


Change by Andriy Maletsky :


--
pull_requests: +8204

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue32102] Add "capture_output=True" option to subprocess.run

2018-01-29 Thread Gregory P. Smith

Gregory P. Smith  added the comment:

Thanks Bo.  I agree with Nick, this is a readability win for a common annoying 
to type otherwise case.

--
resolution:  -> fixed
stage: patch review -> commit review
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue32102] Add "capture_output=True" option to subprocess.run

2018-01-29 Thread Gregory P. Smith

Gregory P. Smith  added the comment:


New changeset ce0f33d04528fcafc673a8707871f8430d8f7ce8 by Gregory P. Smith (Bo 
Bayles) in branch 'master':
bpo-32102 Add "capture_output=True" to subprocess.run (GH-5149)
https://github.com/python/cpython/commit/ce0f33d04528fcafc673a8707871f8430d8f7ce8


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue32102] Add "capture_output=True" option to subprocess.run

2018-01-29 Thread Gregory P. Smith

Change by Gregory P. Smith :


--
assignee:  -> gregory.p.smith

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue32102] Add "capture_output=True" option to subprocess.run

2018-01-22 Thread bbayles

Change by bbayles :


--
nosy: +bbayles

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue32102] Add "capture_output=True" option to subprocess.run

2018-01-11 Thread bbayles

Change by bbayles :


--
keywords: +patch
pull_requests: +5015
stage: needs patch -> patch review

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue32102] Add "capture_output=True" option to subprocess.run

2017-11-21 Thread Barry A. Warsaw

Barry A. Warsaw  added the comment:

Yeah, I find it pretty common to set both stdout and stderr to PIPE, but I'm 
with you in hesitating to add YAO to the subprocess API.  If you do move 
forward with this though, I think capture_output would have to be mutually 
exclusive to stdout and stderr.  You should not be allowed to provide either of 
the latter two if the former is given.

--
nosy: +barry

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue32102] Add "capture_output=True" option to subprocess.run

2017-11-20 Thread Nick Coghlan

New submission from Nick Coghlan :

I'm hesitant to suggest adding yet-another-option to any subprocess API, but 
I'm thinking it may be worth it in this case.

The idea is to make it possible to replace:

result = subprocess.run(cmd, stdout=PIPE, stderr=PIPE)

with:

result = subprocess.run(cmd, capture_output=True)

That way, it would be possible for the raw stdin/stdout/stderr parameters to be 
treated as low level implementation details most of the time, since the most 
common configurations would be:

# Use parent's stdin/stdout/stderr
result = subprocess.run(cmd) 
# Use pipe for stdin, use parent's stdout/stderr
result = subprocess.run(cmd, input=data)
# Use parent's stdin, use pipe for stdout/stderr
result = subprocess.run(cmd, capture_output=True) 
# Use pipe for stdin/stdout/stderr
result = subprocess.run(cmd, input=data, capture_output=True)

--
messages: 306627
nosy: gregory.p.smith, ncoghlan
priority: normal
severity: normal
stage: needs patch
status: open
title: Add "capture_output=True" option to subprocess.run
type: enhancement

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com