unix2win

This one converts a unix text file so it can be read by Notepad.

import sys

filename = sys.argv[-1]
oldfile = []
old = file(filename)
for line in old:
    oldfile.append(line.replace("r",""))
old.close()
new = file(filename,"w")
for line in oldfile:
    new.write(line)
new.close()
Advertisements