Portability across Python 2.X and 3.X