Python File append error
<p>This code works fine for me. Appends data at the end. </p>

<pre><code>def writeFile(dataFile, nameFile):
    fob = open(nameFile,'a+')
    fob.write("%s\n"%dataFile)
    fob.close()
</code></pre>

<p>But the problem is when I close the program and later run  again I found that all the previous data were lost. Process is started to write from the start and there is no data in the file.</p>

<p>But during the run it perfectly add a line at the end of file. </p>

<p>I can't understand the problem. Please some one help.</p>

<p>NB: I am using Ubuntu-10.04 with python 2.6</p>
