On Wed, Jun 22, 2011 at 11:23 PM, Andrej Mitrovic <andrej.mitrovich@gmail.com> wrote:
What am I doing wrong here?

f1 = open('Drum.d', 'r')
lines = f1.readlines()
f1.close()

f2 = open('Drum.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()


That looks 100% right.