This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author vstinner
Recipients brian.curtin, eric.araujo, jldm, ned.deily, r.david.murray, vstinner
Date 2011-03-03.13:18:53
SpamBayes Score 4.001185e-09
Marked as misclassified No
Message-id <>
subprocess_getoutput.patch: patch subprocess.getstatusoutput() to use directly Popen, instead of os.popen, with stderr=subprocess.STDOUT instead of "2>&1" shell redirection. It strips also all trailing spaces and newlines, not just the last one. And finally, it removes "Availability: UNIX." from the documentation.

I tried to add a shell argument (to be able to disable the shell) and to accept any Popen keyword, but I don't know how to implement shell=False if the input is a list of arguments. list2cmdline() is unsafe on UNIX (see #8972). And if getstatusoutput() doesn't accept argument list, it becomes useless with shell=False (it doesn't support to call a program with arguments).

Note: the status is still shifted on UNIX to be compatible with the wait() format.
Date User Action Args
2011-03-03 13:18:56vstinnersetrecipients: + vstinner, ned.deily, eric.araujo, r.david.murray, brian.curtin, jldm
2011-03-03 13:18:55vstinnersetmessageid: <>
2011-03-03 13:18:53vstinnerlinkissue10197 messages
2011-03-03 13:18:53vstinnercreate