some class compatibility

io.BytesIO vs StringIO vs cStringIO