title: Retrieving the output of subprocess.call()
body: <p>How can I get the output of a process run using <code>subprocess.call()</code>?</p>
  
  <p>Passing a <code>StringIO.StringIO</code> object to <code>stdout</code> gives this error:</p>
  
  <pre><code>Traceback (most recent call last):
    File "&lt;stdin&gt;", line 1, in &lt;module&gt;
    File "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/subprocess.py", line 444, in call
      return Popen(*popenargs, **kwargs).wait()
    File "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/subprocess.py", line 588, in __init__
      errread, errwrite) = self._get_handles(stdin, stdout, stderr)
    File "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/subprocess.py", line 945, in _get_handles
      c2pwrite = stdout.fileno()
  AttributeError: StringIO instance has no attribute 'fileno'
  &gt;&gt;&gt; 
  </code></pre>