I\'m using this code to get standard output from an external program:
>>> from subprocess import * >>> command_stdout = Popen([\'ls\', \'-l
You need to decode the bytes object to produce a string:
>>> b"abcde" b'abcde' # utf-8 is used here because it is a very common encoding, but you # need to use the encoding your data is actually in. >>> b"abcde".decode("utf-8") 'abcde'