Reading file issue

loial jldunn2000 at gmail.com
Mon Jan 28 06:47:07 EST 2013


I am parseing a file to extract data, but am seeing the file being updated even though I never explicitly write to the file. It is possible that another process is doing this at some later time, but I just want to check that opening the file as follows and ignoring a record would not result in that record being removed from the file.

I'm damned sure it wouldn't, but just wanted to check with the experts!.


        for line in open("/home/john/myfile"):
            linecount = linecount + 1

            if linecount == 1:  # ignore header
                continue





More information about the Python-list mailing list