#!/usr/bin/env python3
import re, sys

path = "studiosoft_healthcare_cron_run_hc27.py"
src = open(path).read()

# File bytes contain: backslash backslash n  (Python source '\\n' -> literal "\n" at runtime).
# We want: single backslash n (Python source '\n' -> real newline at runtime).
before = src.count("\\\\n")
src = src.replace("\\\\n", "\\n")
after = src.count("\\\\n")
open(path, "w").write(src)
print("replaced", before - after, "occurrences of double-backslash-n; remaining:", after)
