the issue with the temporary file is that when I write something new to it, if the old contents of the file was larger, not all of it will be overwritten.
Not if you open it with
f = open(filename, "w")
which will delete any previous contents the file may have had.
-- Greg Ewing, Computer Science Dept, University of Canterbury, Christchurch, New Zealand http://www.cosc.canterbury.ac.nz/~greg -- http://mail.python.org/mailman/listinfo/python-list