python subprocess.popen get into an infinite loop
<p>I'm trying to run the folowing command on a sub process and collecting the output.</p>

<pre><code>nmap -n -PN -sT -T4  -p 445,139 10.11.1.0/24 --exclude matrix
</code></pre>

<p>this command return an error which is fine by me.</p>

<p>The problem is when i'm doing this from python like this:</p>

<pre><code>import subprocess
nmap_process = subprocess.Popen(command, stdout=subprocess.PIPE,stderr=subprocess.PIPE)        
output,errOutput=nmap_process.communicate()
</code></pre>

<p>the process hang.<br>
if i don't use the stderr param,the first error line of namp is printed in an infinite loop </p>

<p>does anybody have any segesstion about how to handle this?</p>
