Make it work with Python 3