python Popen shell=True behavior
<p>Why would this doesn't work: <code>subprocess.Popen(["ls -l | grep myfile"], shell=False)</code>
But this line works: <code>subprocess.Popen(["ls -l | grep myfile"], shell=True)</code>
I understand this shell=True create a sub shell internally and execute command. But didn't understand how this affect Popen behavior</p>

<p>If you use <code>shell=False</code>, you must be to use like it:</p>

<pre><code>subprocess.Popen(["ls","-l"],shell=False)
</code></pre>

python python-3.x subprocess