Thanks for the reply. I did testing in a clean system, were anti virus/ spyware is not installed. It still gave this problem, in say 1 out of 1000 cases.
By any chance would it be possible that the Windows OS has not completed writing to the file even after file.flush() and file.close() is called? Thanks Roopesh -- http://mail.python.org/mailman/listinfo/python-list