Make codegen to work with python3.

 * Python 3 is now default for some Linux distros.