未验证 提交 fe1daad3 编写于 作者: P pukkandan
上级 0f06bcd7
......@@ -1881,8 +1881,7 @@ def write_string(s, out=None, encoding=None):
assert isinstance(s, str)
out = out or sys.stderr
from .compat import WINDOWS_VT_MODE # Must be imported locally
if WINDOWS_VT_MODE:
if compat_os_name == 'nt' and supports_terminal_sequences(out):
s = re.sub(r'([\r\n]+)', r' \1', s)
if 'b' in getattr(out, 'mode', ''):
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册