six

Python 2 and 3 compatibility utilities

Here are some articles that you may find helpful