*: Pass bytes literal into BytesIO
Otherwise it breaks with str on py3: In [1]: from io import BytesIO In [2]: BytesIO("abc") --------------------------------------------------------------------------- TypeError Traceback (most recent call last) <ipython-input-2-52a130edd46d> in <module>() ----> 1 BytesIO("abc") TypeError: a bytes-like object is required, not 'str'
Showing
Please register or sign in to comment