Message150091
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. |
|
Date |
User |
Action |
Args |
2011-12-22 12:11:29 | pitrou | set | recipients:
+ pitrou, gregory.p.smith, astrand, ncoghlan, vstinner, ned.deily, debatem1, rosslagerwall |
2011-12-22 12:11:29 | pitrou | set | messageid: <1324555889.68.0.0819378686084.issue9922@psf.upfronthosting.co.za> |
2011-12-22 12:11:29 | pitrou | link | issue9922 messages |
2011-12-22 12:11:28 | pitrou | create | |
|