Try to convert both example.py and test.py to Python 3!
- Start with excellent test coverage
- Make sure it runs fine on the latest Python 2.7.x version of Python
- Run Python 2 with the
-3command line switch. This enables warnings about features that will be removed (or change) in 3. Run your test suite again, and fix code that you get warnings about until there are no warnings left, and all your tests still pass. - Run the
2to3source-to-source translator over your source code tree. Run the result of the translation under Python 3. Manually fix up any remaining issues, fixing problems until all tests pass again.
python -m unittest test
Or (easier): pip install nose (in both your Python 2 and Python 3 environment) and just run nosetests when you're in the directory of this repo.