Actual py3 compatibility making on gen-* scripts (#941)

4 files changed