2013-09-24から1日間の記事一覧

変な文字で sys.stdout が止まらないようにする

#! python3 import sys sys.stdout.errors = 'xmlcharrefreplace' # エラー とかできるとうれしいのだがエラーになるので、 AttributeError: attribute 'errors' of '_io.TextIOWrapper' objects is not writablerepr(sys.stdout) やら dir(sys.stdout) を参…