Use the BytesIO for buffering bytes and import the one from the compat module.
Merge pull request #1301 from linovia/bugfix/tutorial_for_python3

Fix tutorial's step 1 for Python 3