Python3 support

Hi.

This is a simple fix for `generate-project.py` to support Python3.