0

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())
Cyker
  • 8,614
  • 7
  • 57
  • 85

0 Answers0