Programming Windows D Examples are now Online!
Andrej Mitrovic
andrej.mitrovich at gmail.com
Wed Jun 22 22:25:37 PDT 2011
It works when I write to a different file:
f1 = open('Drum.d', 'r')
lines = f1.readlines()
f1.close()
f2 = open('Drum2.w', 'w')
for line in lines:
#~ print(patt.sub(replacer, line)) # This replaces the parens correctly
f2.write(patt.sub(replacer, line)) # But the file ends up being
the same..
f2.close()
Looks like some kind of file handling bug in Python?
More information about the Digitalmars-d-announce
mailing list