atpg-ls/ISCAS85/convert.py
2023-02-24 12:08:28 +08:00

18 lines
278 B
Python

import os
import re
for file in os.listdir("."):
if not file.endswith(".bench"): continue
content = open(file, "r").read()
content = re.sub(r"(\d+)", r"\\\1", content)
print(content)
f = open("new/" + file, "w")
f.write(content)
f.close()