Works on other OSes too
WillMoggridge commented on 25 Aug 2014 Attempting to import BytesIO causes errors with Python 2. Import cStringIO for Python 2 and fallback to BytesIO for Python 3.