import re path = "D:/02_Software_Prog/임도설계 및 견적자동화 프로그램 개발/0_old/main.py" with open(path, "r", encoding="utf-8") as f: code = f.read() print("--- Endpoints ---") for m in re.finditer(r'@app\.(get|post)\("([^"]+)"\)', code): print(m.group(0))