file not closing
<p>windows 7, python 2.7.2</p>

<p>The following runs w/o error:</p>

<pre><code>from subprocess import call

f = open("file1","w")
f.writelines("sigh")
f.flush
f.close
call("copy file1 + file2 file3", shell=True)
</code></pre>

<p>However, file3 only contains the contents of file2.  Both file1 and file2 names are echoed as is normal for windows, but, file1 appears to be empty when the copy is called.  It seems as if file1 has not been completely written and flushed.  If file1 has been created separately, as opposed to within the same python file, the following runs as expected:</p>

<pre><code>from subprocess import call
call("copy file1 + file2 file3", shell=True)
</code></pre>

<p>Sorry if python newbieness is to be blamed here.  Many thx for any assist.</p>
