title: Convert bytes to a string
body: <p>I captured the standard output of an external program into a <code>bytes</code> object:</p>
  <pre class="lang-none prettyprint-override"><code>&gt;&gt;&gt; from subprocess import *
  &gt;&gt;&gt; command_stdout = Popen(['ls', '-l'], stdout=PIPE).communicate()[0]
  &gt;&gt;&gt;
  &gt;&gt;&gt; command_stdout
  b'total 0\n-rw-rw-r-- 1 thomas thomas 0 Mar  3 07:03 file1\n-rw-rw-r-- 1 thomas thomas 0 Mar  3 07:03 file2\n'
  </code></pre>
  <p>I want to convert that to a normal Python string, so that I can print it like this:</p>
  <pre class="lang-none prettyprint-override"><code>&gt;&gt;&gt; print(command_stdout)
  -rw-rw-r-- 1 thomas thomas 0 Mar  3 07:03 file1
  -rw-rw-r-- 1 thomas thomas 0 Mar  3 07:03 file2
  </code></pre>
  <p>I tried the <a href="http://docs.python.org/3.0/library/binascii.html?highlight=b2a#binascii.b2a_qp" rel="nofollow noreferrer"><code>binascii.b2a_qp()</code></a> method, but got the same <code>bytes</code> object again:</p>
  <pre class="lang-none prettyprint-override"><code>&gt;&gt;&gt; binascii.b2a_qp(command_stdout)
  b'total 0\n-rw-rw-r-- 1 thomas thomas 0 Mar  3 07:03 file1\n-rw-rw-r-- 1 thomas thomas 0 Mar  3 07:03 file2\n'
  </code></pre>
  <p>How do I convert the <code>bytes</code> object to a <code>str</code> with Python 3?</p>