Writing unicode strings via sys.stdout in Python

后端 未结 5 879
悲哀的现实
悲哀的现实 2020-11-30 02:22

Assume for a moment that one cannot use print (and thus enjoy the benefit of automatic encoding detection). So that leaves us with sys.stdout. Howe

5条回答
  •  情书的邮戳
    2020-11-30 02:48

    It's not clear to my why you wouldn't be able to do print; but assuming so, yes, the approach looks right to me.

提交回复
热议问题