Python Popen grep
<p>I'd like Popen to execute:</p>

<pre><code>grep -i --line-buffered "grave" data/*.txt
</code></pre>

<p>When run from the shell, this gives me the wanted result. If I start, in the very same directory where I test <code>grep</code>, a python repl and follow <a href="http://docs.python.org/library/subprocess.html#popen-constructor" rel="nofollow">the instruction from the docs</a>, I obtain what should be the proper argument list to feed Popen with:</p>

<pre><code>['grep', '-i', '--line-buffered', 'grave', 'data/*.txt']
</code></pre>

<p>The result of <code>p = subprocess.Popen(args)</code> is</p>

<pre><code>grep: data/*.txt: No such file or directory
</code></pre>

<p>and if I try <code>p = subprocess.Popen(args, shell=True)</code>, I get:</p>

<pre><code>Usage: grep [OPTION]... PATTERN [FILE]...
Try `grep --help' for more information.
</code></pre>

<p>Any help on how to perform the wanted process? I'm on MacOS Lion.</p>
