Wrap an open stream with io.TextIOWrapper

后端 未结 6 1675
太阳男子
太阳男子 2020-12-05 13:16

How can I wrap an open binary stream – a Python 2 file, a Python 3 io.BufferedReader, an io.BytesIO – in an io.TextIOWrapper

6条回答
  •  情话喂你
    2020-12-05 14:05

    Based on multiple suggestions in various forums, and experimenting with the standard library to meet the criteria, my current conclusion is this can't be done with the library and types as we currently have them.

提交回复
热议问题