Tommy B wrote: >> import os >> old = open("/path/to/file.txt", "r") >> new = open("/path/to/new.txt", "w") >> for line in old: >> if line.strip() == "Bob 62" >> line = line.replace("62", "66") >> new.write(line) >> old.close() >> new.close() >> os.rename("/path/to/new.txt", "/path/to/file.txt")
> Umm... I tried using this method and it froze. Infiinite loop, I'm > guessing. you have an infinitely large disk with an infinitely large file on it? </F> -- http://mail.python.org/mailman/listinfo/python-list