What does the b'' sentinel mean in Python iter()?
<p>Let's say I have a process that returns a bunch of lines, which I want to iterate through:</p>

<pre><code>import subprocess

myCmd = ['foo', '--bar', '--baz']
myProcess = subprocess.Popen(myCmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
for myLine in iter(myProcess.stdout.readline, b''):
    print myLine
</code></pre>

<p>What does the sentinel argument to <a href="http://docs.python.org/2/library/functions.html#iter" rel="nofollow"><code>iter()</code></a> do in this example, where I pass it the value <code>b''</code>? I think I understand <code>''</code> by itself — I stop iterating on an empty line — but I don't know what <code>b''</code> means. </p>
