Antoine Pitrou <pit...@free.fr> added the comment:

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.

----------
nosy: +ncoghlan, pitrou

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue9922>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to