make io.py python3 compatible