subprocess call use a generated file name?
<p>So I have a python script that generates a file name based on the time. Then I am trying to cat some data into that file name. However, it seems that I cannot pass it in or something. </p>

<p>Here is what the code looks like</p>

<pre><code>fileName = "parsedOn_"+strftime("%Y_%m_%d_%H%M%S", gmtime())+".csv"
subprocess.call(['cat' + 'xaa' + '&gt;' + fileName])
</code></pre>

<p>Here is the error I get,</p>

<pre><code>Traceback (most recent call last):
File "parseCSV.py", line 96, in &lt;module&gt;
subprocess.call(['cat' + 'xaa' + '&gt;' + finalFile1])
File "/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/subprocess.py", line 444, in call
return Popen(*popenargs, **kwargs).wait()
File "/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/subprocess.py", line 595, in __init__
errread, errwrite)
File "/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/subprocess.py", line 1106, in _execute_child
raise child_exception
OSError: [Errno 2] No such file or directory
</code></pre>

<p>Any ideas if what I'm trying to do is possible with subprocess at all?</p>
