Spaces:
Runtime error
Runtime error
| def clean_file(file_path): | |
| replacements = { | |
| "‘": "'", "’": "'", | |
| "“": '"', "”": '"' | |
| } | |
| with open(file_path, "r", encoding="utf-8") as f: | |
| content = f.read() | |
| for wrong, right in replacements.items(): | |
| content = content.replace(wrong, right) | |
| with open(file_path, "w", encoding="utf-8") as f: | |
| f.write(content) | |
| print(f"[✓] 스마트 따옴표 제거 완료: {file_path}") | |
| clean_file("app.py") | |