Treat binary data as a file object?

This is what StringIO (in Python 2) and io.BytesIO in (in Python 3) are for.

Leave a Comment