[issue10197] subprocess.getoutput fails on win32

R. David Murray report at bugs.python.org
Fri Dec 3 14:53:45 CET 2010


R. David Murray <rdmurray at bitdance.com> added the comment:

Ah, I did not realize that getstatusoutput was implemented using os.popen.  I thought it already used Popen.  Now, in python3, os.popen is in turn implemented using subprocess.Popen, so removing that level of indirection seems sensible.

The question that remains is, does removing the {} change the output obtained from a command sequence in any way?

Note that for backward compatibility you will need to re-munge the status code into C format.  Which makes me wonder if getoutput/getstatusoutput should just be documentationally deprecated instead.  (I never use them myself, FWIW)

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue10197>
_______________________________________


More information about the Python-bugs-list mailing list