chris> fp = open("tmp", "rw") oops, indicision on my part. see below > fd = open("ftbl", "wr") The "w" truncates the file. You probably want either "r" or "r+" or "a+" see the python library reference on open or the C fopen call. try fd = open("ftbl", "r+") -chris