abpt / src /utils /stdio.py
Search
auto: sync run_qwen_phase_probe.py
20ccbfa
from __future__ import annotations
import sys
def configure_utf8_stdio() -> None:
for stream_name in ("stdout", "stderr"):
stream = getattr(sys, stream_name, None)
reconfigure = getattr(stream, "reconfigure", None)
if callable(reconfigure):
reconfigure(encoding="utf-8", errors="replace")