Skip to content

Embed URL

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
def reopen_stdio_with_encoding(encoding='utf-8'):
import io
import sys
def reopen(file):
file.__init__(file.detach(),
line_buffering=file.line_buffering,
encoding=encoding)
reopen(sys.stdout)
reopen(sys.stderr)
reopen(sys.stdin)
reopen_stdio_with_encoding()
print("ほげほげ")
@methane
Owner

re-init rather than opening other TextIOWrapper.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.