Prompt file imported from Zeruel87/Cameo-mod (
.windsurf/workflows/run_python_safe.md). Copyright stays with the author.
Safe Python execution workflow
All Python scripts in this repo must be executed through the guard wrapper so syntax is checked first and a 60-second timeout prevents runaway processes.
- Syntax-check the script first:
python -m py_compile <script.py> - Run it through the guard:
python tools/balance/run_with_guard.py <script.py> [args] - If the guard times out, do not re-run blindly — inspect the script for infinite loops or expensive operations and fix the root cause.
Examples:
python tools/balance/run_with_guard.py tools/balance/extract_stats.pypython tools/balance/run_with_guard.py tools/balance/build_workbook.pypython tools/balance/run_with_guard.py tools/audit/audit_min_range.py
