Python: CSV file is still Blank after writing Data
<p>I have a Tuple result from mysql like this :</p>

<pre><code>sqlResult=({'Count': 1L, 'gname': 'Anron may'}, {'Count': 1L, 'gname': 'Anchy de'}, {'Count': 1L, 'gname': 'abby ras'}, {'Count': 2L, 'gname': 'Akki nome'}, {'Count': 41L, 'gname': 'Archenemy'}, {'Count': 1L, 'gname': 'Antony papa'}, {'Count': 1L, 'gname': 'Dead zombie'})
</code></pre>

<p>I am trying to save this data to CSV file like this</p>

<pre><code>import time
csvName="Gnames-and-count-"+str(int(time.time()))
csvPath="/home/sean/Desktop/"+str(csvName)+str(".csv")
writer = csv.writer(open(csvPath, 'wt'))
for results in sqlResult:
    writer.writerow([results['gname'],int(results['Count'])])
</code></pre>

<p>The file is created at the following path but nothing is there on the file.
Is there any obvious thing i am missing? .Please guide me.</p>
