What is the difference between using codecs.StreamReader
and io.TextIOWrapper
on a binary stream?
#!/usr/bin/env python3
import codecs
import io
stream = io.BytesIO(b'abc')
#reader = codecs.getreader('utf-8')(stream)
reader = io.TextIOWrapper(stream)
print(reader, reader.read())