8 print 'args: LOGFILE CLASS FUNC NEW_FUNC'
11 new_func = sys.argv[4]
13 log_ls = open (sys.argv[1]).readlines ()
14 regex = re.compile ("([^:]+):([0-9]+): error: .class ([_a-zA-Z]+). has no member named .%s." % func)
25 line_no = string.atoi (m.group (2))
31 if not files.has_key (file):
32 files[file] = open (file).read ().split ('\n')
35 files[file][line_no] = re.sub (func, new_func, files[file][line_no])
38 for (f,ls) in files.items():
40 os.rename (f, f + '~')
41 open (f, 'w').write ('\n'.join (ls))