Thank you guys for all your help. Was able to nail it down. uh I dunno where i saw the 'wt' at. somewhere online though. I have to do it in 2 stages though and run through a coula files but it works. import re f = open("oldfile.txt") w = open("newfile.txt", "w") for line in f: if line.strip():
w.write(line) f.close() w.close() g = open("newfile.txt") x = open("mynewfile.txt", "w") x.write(g.read().rstrip('\n')) x.close() Got around the I/O errors luckily thanks guys -- http://mail.python.org/mailman/listinfo/python-list