def regenerate(filename, modules):
        f = open(filename)
        try:
            content = f.read()
        finally:
            f.close()

        header = content[:content.find('MODULES = {')]
        footer = content[content.find("if __name__ == '__main__':"):]


        f = open(filename, 'w')
        f.write(header)
        f.write(pprint.pformat(modules) % 'MODULES = %s\n\n')
        f.write(footer)
        f.close()
dataset/ETHPy150Open adieu/allbuttonspressed/pygments/lexers/_luabuiltins.py/regenerate/swapped operands of `%`