Work with Python 2 and Python 3