[Python]How to convert/record the output from subprocess into a file
<p>I am using subprocess module, which Popen class output some results like:</p>

<p>063.245.209.093.00080-128.192.076.180.01039:HTTP/1.1 302 Found
063.245.209.093.00080-128.192.076.180.01040:HTTP/1.1 302 Found</p>

<p>and here is the script I wrote:</p>

<pre><code>import subprocess, shlex, fileinput,filecmp
proc = subprocess.Popen('egrep \'^HTTP/\' *', shell=True,      stdin=subprocess.PIPE, stdout=subprocess.PIPE,)
stdout_value = proc.communicate()[0]
print 'results:'
print stdout_value
</code></pre>

<p>My question is: how to convert/record the results from stdout into a file?</p>

<p>I appreciate all your responses and helps!</p>
