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 pitrou
Recipients astrand, debatem1, gregory.p.smith, ncoghlan, ned.deily, pitrou, rosslagerwall, vstinner
Date 2011-12-22.12:11:28
SpamBayes Score 1.9945196e-07
Marked as misclassified No
Message-id <1324555889.68.0.0819378686084.issue9922@psf.upfronthosting.co.za>
In-reply-to
Content
Well, getoutput and getstatusoutput are arguably ugly.

However, since they are very high-level functions meant to quickly execute commands, returning str makes sense. You can't do anything smart with the output anyway, since stdout and stderr are intermingled: any binary data will be ruined by accompanying stderr output (e.g. warnings).

If you want to process the output data instead of displaying it to the user, use check_call() instead.

We could perhaps use the "surrogateescape" error handler in getoutput and getstatusoutput, but that's really putting lipstick on a pig.
History
Date User Action Args
2011-12-22 12:11:29pitrousetrecipients: + pitrou, gregory.p.smith, astrand, ncoghlan, vstinner, ned.deily, debatem1, rosslagerwall
2011-12-22 12:11:29pitrousetmessageid: <1324555889.68.0.0819378686084.issue9922@psf.upfronthosting.co.za>
2011-12-22 12:11:29pitroulinkissue9922 messages
2011-12-22 12:11:28pitroucreate