Enable 2to3 for the Python scripts

fixes #7037